• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * It is known that this code not compiled by following compilers:
3  *   gcc 2.95.3
4  *   gcc 3.3.3
5  *   gcc 3.4.1
6  *   gcc 4.1.1
7  *
8  * It is known that this code compiled by following compilers:
9  *
10  *   MSVC 6
11  *   MSVC 8 Beta
12  */
13 
14 /*
15  * Indeed this code is wrong: 1. explicit template specialization
16  * have to appear out-of-class; 2. specialized struct C have to
17  * have function f.
18  *
19  */
20 
21 struct A
22 {
23   private:
24     struct B
25     {
26         template <typename T>
fA::B27         static void f( T& ) {}
28 
29         template <bool V>
30         struct C
31         {
32             template <typename T>
fA::B::C33             static void f( T& ) {}
34         };
35 
36         template <>
37         struct C<true>
38         {
39         };
40     };
41 };
42 
43