2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.oliva / template10.C
blob6991bf9c5ddfb824c65a39654b2ad17f61227b3f
1 // { dg-do assemble  }
3 // Copyright (C) 1999 Free Software Foundation
5 // by Alexandre Oliva <oliva@lsd.ic.unicamp.br>
6 // bug report by Martin Sebor <sebor@roguewave.com>
7 // based on C++ Standard example in [temp.expl.spec]/5
9 /* Members of explicitly specialized template classes shall not be
10    defined with template-specialization syntax.  The example in the
11    Standard contains a definition of a member function of the
12    explicitly specialized class template, but the paragraph refers to
13    members in general, not only member functions.  */
15 template<class T> struct A {};
17 template<> struct A<int> {
18   static bool a, b;
21 bool A<int>::a = true; // ok
22 template<> bool A<int>::b = false; // { dg-error "" "" { xfail *-*-* } }