@@ -27,27 +27,43 @@ static_assert(A<short>::x<int*> == 1);
27
27
28
28
template <>
29
29
template <typename U>
30
- struct A <long >::B {
30
+ struct A <int >::B {
31
31
static constexpr int y = 2 ;
32
32
};
33
33
34
34
template <>
35
35
template <typename U>
36
- struct A <long >::B<U&> {
36
+ struct A <int >::B<U&> {
37
37
static constexpr int y = 3 ;
38
38
};
39
39
40
40
template <>
41
41
template <typename U>
42
- constexpr int A<long >::x = 2 ;
42
+ struct A <long >::B<U&> {
43
+ static constexpr int y = 4 ;
44
+ };
45
+
46
+ template <>
47
+ template <typename U>
48
+ constexpr int A<int >::x = 2 ;
43
49
44
50
template <>
45
51
template <typename U>
46
- constexpr int A<long >::x<U&> = 3 ;
47
-
48
- static_assert (A<long >::B<int >::y == 2 );
49
- static_assert (A<long >::B<int *>::y == 2 );
50
- static_assert (A<long >::B<int &>::y == 3 );
51
- static_assert (A<long >::x<int > == 2 );
52
- static_assert (A<long >::x<int *> == 2 );
53
- static_assert (A<long >::x<int &> == 3 );
52
+ constexpr int A<int >::x<U&> = 3 ;
53
+
54
+ template <>
55
+ template <typename U>
56
+ constexpr int A<long >::x<U&> = 4 ;
57
+
58
+ static_assert (A<int >::B<int >::y == 2 );
59
+ static_assert (A<int >::B<int *>::y == 2 );
60
+ static_assert (A<int >::B<int &>::y == 3 );
61
+ static_assert (A<int >::x<int > == 2 );
62
+ static_assert (A<int >::x<int *> == 2 );
63
+ static_assert (A<int >::x<int &> == 3 );
64
+ static_assert (A<long >::B<int >::y == 0 );
65
+ static_assert (A<long >::B<int *>::y == 1 );
66
+ static_assert (A<long >::B<int &>::y == 4 );
67
+ static_assert (A<long >::x<int > == 0 );
68
+ static_assert (A<long >::x<int *> == 1 );
69
+ static_assert (A<long >::x<int &> == 4 );
0 commit comments