Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.dg / template / overload5.C
blob8e520e929075f158115f930eea79424156b3d987
1 // PR c++/22621
3 struct foo {
4     typedef int (*fun)(int);
6   static int f(int);    // overload between static & non-static
7     int f();
9   static int g(int);    // non-overloaded static
12 template<foo::fun>
13 struct f_obj {
14   // something ..
17 f_obj<&foo::f> a;   // OK
18 f_obj<foo::f>  b;   // OK (note: a and b are of the same type)
20 int foo::f()
22   f_obj<&foo::f> a;   // OK
23   f_obj<foo::f>  b;   // ERROR: foo::f cannot be a constant expression
25   f_obj<&foo::g> c;   // OK
26   f_obj<foo::g>  d;   // OK