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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [member5.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// Contributed by: 
3
// PR c++/14389: Disambiguate overloaded member templates which differ only
4
//  in the template argument list.
5
 
6
namespace N1 {
7
 
8
struct S {
9
    template< typename B, typename A > void foo();
10
    template< typename A >             void foo();
11
};
12
 
13
template< typename A >             void S::foo() {}
14
template< typename B, typename A > void S::foo() {}
15
 
16
template void S::foo ();
17
template void S::foo ();
18
 
19
}
20
 
21
namespace N2 {
22
 
23
struct S {
24
  template< typename _A > void foo();
25
  template< int _i >      void foo();
26
};
27
 
28
template< typename _A > void S::foo() {}
29
 
30
template void S::foo< 0 >();    // { dg-error "no definition available" "no def" }
31
                                // { dg-message "required" "instantiated" { target *-*-* } 30 }
32
 
33
}

powered by: WebSVN 2.1.0

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