Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.jason/template6.C

raw
1 // { dg-do run }
2 // PRMS Id: 4656
3 // Testcase for use of member pointers in template resolution
4
5 template <class T> class A {
6 public:
7 A() : a(1) {}
8 T a;
9 };
10
11 template <class T>
12 int foo (T A<int>::*p)
13 {
14 return 0;
15 }
16 int main()
17 {
18 int A<int>::*pm = &A<int>::a; // { dg-bogus "" } failed temp resolution
19 foo (pm);
20 return 0;
21 }