31
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
/*
|
|
18 |
* It is known that this code not compiled by following compilers:
|
|
19 |
* gcc 2.95.3
|
|
20 |
* gcc 3.3.3
|
|
21 |
* gcc 3.4.1
|
|
22 |
*
|
|
23 |
* It is known that this code compiled by following compilers:
|
|
24 |
*
|
|
25 |
* MSVC 6
|
|
26 |
* MSVC 8 Beta
|
|
27 |
*/
|
|
28 |
|
|
29 |
/*
|
|
30 |
* Indeed this code is wrong: explicit template specialization
|
|
31 |
* have to appear out-of-class.
|
|
32 |
*
|
|
33 |
*/
|
|
34 |
|
|
35 |
struct A
|
|
36 |
{
|
|
37 |
private:
|
|
38 |
struct B
|
|
39 |
{
|
|
40 |
template <typename T>
|
|
41 |
static void f( T& ) {}
|
|
42 |
|
|
43 |
template <bool V>
|
|
44 |
struct C
|
|
45 |
{
|
|
46 |
template <typename T>
|
|
47 |
static void f( T& ) {}
|
|
48 |
};
|
|
49 |
|
|
50 |
template <>
|
|
51 |
struct C<true>
|
|
52 |
{
|
|
53 |
template <typename T>
|
|
54 |
static void f( T& ) {}
|
|
55 |
};
|
|
56 |
};
|
|
57 |
};
|
|
58 |
|