OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [template/] [member5.C] - Diff between revs 301 and 338

Only display areas with differences | Details | Blame | View Log

Rev 301 Rev 338
// { dg-do compile }
// { dg-do compile }
// Contributed by: 
// Contributed by: 
// PR c++/14389: Disambiguate overloaded member templates which differ only
// PR c++/14389: Disambiguate overloaded member templates which differ only
//  in the template argument list.
//  in the template argument list.
namespace N1 {
namespace N1 {
struct S {
struct S {
    template< typename B, typename A > void foo();
    template< typename B, typename A > void foo();
    template< typename A >             void foo();
    template< typename A >             void foo();
};
};
template< typename A >             void S::foo() {}
template< typename A >             void S::foo() {}
template< typename B, typename A > void S::foo() {}
template< typename B, typename A > void S::foo() {}
template void S::foo ();
template void S::foo ();
template void S::foo ();
template void S::foo ();
}
}
namespace N2 {
namespace N2 {
struct S {
struct S {
  template< typename _A > void foo();
  template< typename _A > void foo();
  template< int _i >      void foo();
  template< int _i >      void foo();
};
};
template< typename _A > void S::foo() {}
template< typename _A > void S::foo() {}
template void S::foo< 0 >();    // { dg-error "no definition available" "no def" }
template void S::foo< 0 >();    // { dg-error "no definition available" "no def" }
                                // { dg-message "instantiated" "instantiated" { target *-*-* } 30 }
                                // { dg-message "instantiated" "instantiated" { target *-*-* } 30 }
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.