aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/explicit71.C
blob: c84eebcc4289a62060cf0e7b9b09b2a9a65a30d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Build don't link:
// by Alexandre Oliva <oliva@dcc.unicamp.br>
// Based on a testcase by Reid M. Pinchback <reidmp@MIT.EDU>
// According to the C++ Standard [temp.expl.spec]/17-18, explicit
// specializations are only valid if all enclosing template classes
// of the specialized template are fully specialized too

template <class X> 
class bug {
  template <class Y> 
  class a {}; 
};
template <class X> 
template <>			// ERROR - invalid specialization
class bug<X>::a<char> {};	// ERROR -  ""