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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [template/] [member5.C] - Rev 301

Compare with Previous | Blame | View Log

// { dg-do compile }
// Contributed by: <fasbjx at free dot fr>
// PR c++/14389: Disambiguate overloaded member templates which differ only
//  in the template argument list.

namespace N1 {

struct S { 
    template< typename B, typename A > void foo(); 
    template< typename A >             void foo(); 
}; 
 
template< typename A >             void S::foo() {} 
template< typename B, typename A > void S::foo() {} 
 
template void S::foo<void> (); 
template void S::foo<void,void> (); 

}

namespace N2 {

struct S { 
  template< typename _A > void foo(); 
  template< int _i >      void foo(); 
}; 

template< typename _A > void S::foo() {} 

template void S::foo< 0 >();    // { dg-error "no definition available" "no def" }
                                // { dg-message "instantiated" "instantiated" { target *-*-* } 30 }

}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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