Skip to content

Commit a3356a0

Browse files
committed
[FOLD] add more tests
1 parent b8b0869 commit a3356a0

File tree

1 file changed

+27
-11
lines changed
  • clang/test/CXX/temp/temp.decls/temp.spec.partial/temp.spec.partial.member

1 file changed

+27
-11
lines changed

clang/test/CXX/temp/temp.decls/temp.spec.partial/temp.spec.partial.member/p2.cpp

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,43 @@ static_assert(A<short>::x<int*> == 1);
2727

2828
template<>
2929
template<typename U>
30-
struct A<long>::B {
30+
struct A<int>::B {
3131
static constexpr int y = 2;
3232
};
3333

3434
template<>
3535
template<typename U>
36-
struct A<long>::B<U&> {
36+
struct A<int>::B<U&> {
3737
static constexpr int y = 3;
3838
};
3939

4040
template<>
4141
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;
4349

4450
template<>
4551
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

Comments
 (0)