Skip to content

Commit b93376f

Browse files
H-G-HristovZingam
andauthored
[libc++][type_traits] reference_{constructs|converts}_from_temporary with -Winvalid-specialization tests (#133946)
Addresses comment: https://github.com/llvm/llvm-project/pull/128649/files#r2022341035 --------- Co-authored-by: Hristo Hristov <zingam@outlook.com>
1 parent daab7d0 commit b93376f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

libcxx/test/libcxx/type_traits/no_specializations.verify.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@ SPECIALIZE_UTT(is_unbounded_array); // expected-error 2 {{cannot be speciali
156156
# if TEST_STD_VER >= 23
157157
SPECIALIZE_UTT(is_implicit_lifetime); // expected-error 2 {{cannot be specialized}}
158158
SPECIALIZE_UTT(is_scoped_enum); // expected-error 2 {{cannot be specialized}}
159+
# if __has_builtin(__reference_constructs_from_temporary)
160+
SPECIALIZE_BTT(reference_constructs_from_temporary); // expected-error 2 {{cannot be specialized}}
161+
# endif
162+
# if __has_builtin(__reference_converts_from_temporary)
163+
SPECIALIZE_BTT(reference_converts_from_temporary); // expected-error 2 {{cannot be specialized}}
164+
# endif
159165
# endif
160166

161167
# if TEST_STD_VER >= 26
@@ -177,8 +183,8 @@ struct std::conditional<true, S, S>; // expected-error {{cannot be specialized}}
177183
template <>
178184
struct std::enable_if<true, S>; // expected-error {{cannot be specialized}}
179185

180-
#if TEST_STD_VER >= 20
186+
# if TEST_STD_VER >= 20
181187
template <>
182188
struct std::integral_constant<S, {}>; // expected-error {{cannot be specialized}}
183-
#endif
189+
# endif
184190
#endif

0 commit comments

Comments
 (0)