OSDN Git Service

* g++.old-deja/g++.pt/static11.C: Add xtensa-*-elf* to the
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.pt / explicit81.C
1 // Build don't link:
2 // 
3 // Copyright (C) 2000 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 10 Aug 2000 <nathan@codesourcery.com>
5
6 // bug 371 We failed to subst explicit template args before trying to
7 // deduce the template.
8
9 namespace N
10 {
11 enum E { e0 };
12
13 template< E e > void nf();
14
15 }
16
17 template< N::E e > void gf();
18
19 struct X {
20   template<N::E e> void xfn ();
21   template<N::E e> static void sfn ();
22 };
23
24 template < class C >
25 void tf(C *ptr)
26 {
27   N::nf<N::e0>();
28   gf<N::e0>();
29   ptr->X::xfn <N::e0> ();
30   ptr->C::template xfn <N::e0> ();
31   ptr->template xfn <N::e0> ();
32   ptr->X::sfn <N::e0> ();
33   ptr->C::template sfn <N::e0> ();
34   ptr->template sfn <N::e0> ();
35   X::sfn <N::e0> ();
36   C::template sfn <N::e0> ();
37 }
38
39 void f(X *ptr)
40 {
41   ptr->xfn <N::e0> ();
42   tf(ptr);
43 }