@@ -20,50 +20,66 @@ struct A {
2020 static constexpr int x<U*> = 1 ;
2121};
2222
23+ template <typename T>
24+ template <typename U>
25+ struct A <T>::B<U[]> {
26+ static constexpr int y = 2 ;
27+ };
28+
29+ template <typename T>
30+ template <typename U>
31+ constexpr int A<T>::x<U[]> = 2 ;
32+
2333static_assert (A<short >::B<int >::y == 0 );
2434static_assert (A<short >::B<int *>::y == 1 );
35+ static_assert (A<short >::B<int []>::y == 2 );
2536static_assert (A<short >::x<int > == 0 );
2637static_assert (A<short >::x<int *> == 1 );
38+ static_assert (A<short >::x<int []> == 2 );
2739
2840template <>
2941template <typename U>
3042struct A <int >::B {
31- static constexpr int y = 2 ;
43+ static constexpr int y = 3 ;
3244};
3345
3446template <>
3547template <typename U>
3648struct A <int >::B<U&> {
37- static constexpr int y = 3 ;
49+ static constexpr int y = 4 ;
3850};
3951
4052template <>
4153template <typename U>
4254struct A <long >::B<U&> {
43- static constexpr int y = 4 ;
55+ static constexpr int y = 5 ;
4456};
4557
4658template <>
4759template <typename U>
48- constexpr int A<int >::x = 2 ;
60+ constexpr int A<int >::x = 3 ;
4961
5062template <>
5163template <typename U>
52- constexpr int A<int >::x<U&> = 3 ;
64+ constexpr int A<int >::x<U&> = 4 ;
5365
5466template <>
5567template <typename U>
56- constexpr int A<long >::x<U&> = 4 ;
68+ constexpr int A<long >::x<U&> = 5 ;
5769
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 );
70+ static_assert (A<int >::B<int >::y == 3 );
71+ static_assert (A<int >::B<int *>::y == 3 );
72+ static_assert (A<int >::B<int []>::y == 3 );
73+ static_assert (A<int >::B<int &>::y == 4 );
74+ static_assert (A<int >::x<int > == 3 );
75+ static_assert (A<int >::x<int *> == 3 );
76+ static_assert (A<int >::x<int []> == 3 );
77+ static_assert (A<int >::x<int &> == 4 );
6478static_assert (A<long >::B<int >::y == 0 );
6579static_assert (A<long >::B<int *>::y == 1 );
66- static_assert (A<long >::B<int &>::y == 4 );
80+ static_assert (A<long >::B<int []>::y == 2 );
81+ static_assert (A<long >::B<int &>::y == 5 );
6782static_assert (A<long >::x<int > == 0 );
6883static_assert (A<long >::x<int *> == 1 );
69- static_assert (A<long >::x<int &> == 4 );
84+ static_assert (A<long >::x<int []> == 2 );
85+ static_assert (A<long >::x<int &> == 5 );
0 commit comments