2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / explicit81.C
blob576ba5439a64fad36b0ecd43d8beb53f371db305
1 // { dg-do assemble  }
2 // 
3 // Copyright (C) 2000 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 10 Aug 2000 <nathan@codesourcery.com>
6 // bug 371 We failed to subst explicit template args before trying to
7 // deduce the template.
9 namespace N
11 enum E { e0 };
13 template< E e > void nf();
17 template< N::E e > void gf();
19 struct X {
20   template<N::E e> void xfn ();
21   template<N::E e> static void sfn ();
24 template < class C >
25 void tf(C *ptr)
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> ();
39 void f(X *ptr)
41   ptr->xfn <N::e0> ();
42   tf(ptr);