author | sl |
Tue, 10 Jun 2014 14:32:02 +0200 | |
changeset 1 | 260cb5ec6c19 |
permissions | -rw-r--r-- |
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 *
7 * It is known that this code compiled by following compilers:
8 *
9 * MSVC 6
10 * MSVC 8 Beta
11 */
13 /*
14 * Indeed this code is wrong: 1. explicit template specialization
15 * have to appear out-of-class; 2. specialized struct C have to
16 * have function f.
17 *
18 */
20 struct A
21 {
22 private:
23 struct B
24 {
25 template <typename T>
26 static void f( T& ) {}
28 template <bool V>
29 struct C
30 {
31 template <typename T>
32 static void f( T& ) {}
33 };
35 template <>
36 struct C<true>
37 {
38 };
39 };
40 };