@@ -27,27 +27,43 @@ static_assert(A<short>::x<int*> == 1);
2727
2828template <>
2929template <typename  U>
30- struct  A <long >::B {
30+ struct  A <int >::B {
3131  static  constexpr  int  y = 2 ;
3232};
3333
3434template <>
3535template <typename  U>
36- struct  A <long >::B<U&> {
36+ struct  A <int >::B<U&> {
3737  static  constexpr  int  y = 3 ;
3838};
3939
4040template <>
4141template <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 ;
4349
4450template <>
4551template <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