2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / spec20.C
blob064ce1423a7979c12c2b832a1af3cf3f335444a8
1 // { dg-do assemble  }
3 // According to the non-normative example in
4 // [temp.class.spec.mfunc]/2, these should be valid, but the grammar
5 // in the Standard does not allow partial nor full specializations as
6 // member-declarations, so we'd better not support them.
8 template <class T> 
9 struct S {
10   template <class U> void f(U);
11   template <> void f<int>(int); // { dg-error "" } invalid specialization
13   template <class V> struct I {};
14   template <class V> struct I<V*> {};
15   template <> struct I<int>; // { dg-error "" } invalid specialization