Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.pt/explicit71.C

raw
1 // { dg-do assemble }
2 // by Alexandre Oliva <[email protected]>
3 // Based on a testcase by Reid M. Pinchback <[email protected]>
4 // According to the C++ Standard [temp.expl.spec]/17-18, explicit
5 // specializations are only valid if all enclosing template classes
6 // of the specialized template are fully specialized too
7
8 template <class X>
9 class bug {
10 template <class Y>
11 class a {};
12 };
13 template <class X>
14 template <> // { dg-error "" } invalid specialization
15 class bug<X>::a<char> {}; // { dg-error "" }