1 template<typename T
, class P
>
2 struct TwoOptionTemplate
{};
5 struct TwoOptionTemplate
<T
, char> {
11 struct TwoOptionTemplate
<T
, double> {
16 struct TwoOptionTemplate
<T
, T
> {
20 TwoOptionTemplate
<int, char> X0
;
21 TwoOptionTemplate
<int, float> X1
;
22 TwoOptionTemplate
<void *, wchar_t> X2
;
23 TwoOptionTemplate
<long, long> X3
;
24 TwoOptionTemplate
<float, float> X4
;
25 TwoOptionTemplate
<long, long> SingleSource
;
26 TwoOptionTemplate
<char, double> SecondDoubleSource
;
29 template<int I
, class C
>
30 struct IntTemplateSpec
{};
33 struct IntTemplateSpec
<4, C
> {
38 struct IntTemplateSpec
<I
, void *> {
40 static constexpr int val
= I
;
44 struct IntTemplateSpec
<I
, double> {
46 static constexpr int val
= I
;
49 IntTemplateSpec
<4, wchar_t> Y0
;
50 IntTemplateSpec
<5, void *> Y1
;
51 IntTemplateSpec
<1, long> Y2
;
52 IntTemplateSpec
<3, int> Y3
;
53 //template<int I> constexpr int IntTemplateSpec<I, double>::val;
54 IntTemplateSpec
<42, double> NumberSource
;
55 static_assert(NumberSource
.val
== 42);
59 // Just an empty namespace to ensure we can deal with multiple namespace decls.
75 template<typename T
, typename X
>
76 struct Child1
: public Two::Three::Parent
<unsigned> {
81 struct Child1
<T
, One::Two::Three::Parent
<T
>> {
87 One::Child1
<int, double> Z0Source
;
89 // Test import of nested namespace specifiers
92 template<typename U
> class Inner0
;
97 class Outer
<X
>::Inner0
{
100 template<typename Z
> struct Inner1
;
105 void Outer
<X
>::Inner0
<Y
>::f(X
, Y
) {}
110 class Outer
<X
>::Inner0
<Y
>::Inner1
{
118 void Outer
<X
>::Inner0
<Y
>::Inner1
<Z
>::f(Y
, Z
) {}