diff --git a/libcxx/include/__type_traits/reference_constructs_from_temporary.h b/libcxx/include/__type_traits/reference_constructs_from_temporary.h index 3d097ce90cb09..a8325620414ea 100644 --- a/libcxx/include/__type_traits/reference_constructs_from_temporary.h +++ b/libcxx/include/__type_traits/reference_constructs_from_temporary.h @@ -18,7 +18,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if _LIBCPP_STD_VER >= 23 && __has_builtin(__reference_constructs_from_temporary) +#if _LIBCPP_STD_VER >= 23 template struct _LIBCPP_NO_SPECIALIZATIONS reference_constructs_from_temporary diff --git a/libcxx/include/__type_traits/reference_converts_from_temporary.h b/libcxx/include/__type_traits/reference_converts_from_temporary.h index c68f1765af9d5..9c51225e53b8e 100644 --- a/libcxx/include/__type_traits/reference_converts_from_temporary.h +++ b/libcxx/include/__type_traits/reference_converts_from_temporary.h @@ -18,7 +18,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if _LIBCPP_STD_VER >= 23 && __has_builtin(__reference_converts_from_temporary) +#if _LIBCPP_STD_VER >= 23 template struct _LIBCPP_NO_SPECIALIZATIONS reference_converts_from_temporary diff --git a/libcxx/include/tuple b/libcxx/include/tuple index 466f501b5f4f8..3c5330dd6e14e 100644 --- a/libcxx/include/tuple +++ b/libcxx/include/tuple @@ -1443,7 +1443,7 @@ template (std::forward<_Tuple>(__t), make_index_sequence>>()))) { -#if _LIBCPP_STD_VER >= 23 && __has_builtin(__reference_constructs_from_temporary) +#if _LIBCPP_STD_VER >= 23 if constexpr (tuple_size_v> == 1) { static_assert(!std::reference_constructs_from_temporary_v<_Tp, decltype(std::get<0>(std::declval<_Tuple>()))>, "Attempted construction of reference element binds to a temporary whose lifetime has ended"); diff --git a/libcxx/test/libcxx/type_traits/no_specializations.verify.cpp b/libcxx/test/libcxx/type_traits/no_specializations.verify.cpp index 897ae89365014..3fac952b9eb98 100644 --- a/libcxx/test/libcxx/type_traits/no_specializations.verify.cpp +++ b/libcxx/test/libcxx/type_traits/no_specializations.verify.cpp @@ -154,14 +154,10 @@ SPECIALIZE_UTT(is_unbounded_array); // expected-error 2 {{cannot be speciali # endif # if TEST_STD_VER >= 23 -SPECIALIZE_UTT(is_implicit_lifetime); // expected-error 2 {{cannot be specialized}} -SPECIALIZE_UTT(is_scoped_enum); // expected-error 2 {{cannot be specialized}} -# if __has_builtin(__reference_constructs_from_temporary) +SPECIALIZE_UTT(is_implicit_lifetime); // expected-error 2 {{cannot be specialized}} +SPECIALIZE_UTT(is_scoped_enum); // expected-error 2 {{cannot be specialized}} SPECIALIZE_BTT(reference_constructs_from_temporary); // expected-error 2 {{cannot be specialized}} -# endif -# if __has_builtin(__reference_converts_from_temporary) -SPECIALIZE_BTT(reference_converts_from_temporary); // expected-error 2 {{cannot be specialized}} -# endif +SPECIALIZE_BTT(reference_converts_from_temporary); // expected-error 2 {{cannot be specialized}} # endif # if TEST_STD_VER >= 26 diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/reference_constructs_from_temporary.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/reference_constructs_from_temporary.pass.cpp index ad53c8176cc92..84fe7cfb02208 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/reference_constructs_from_temporary.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/reference_constructs_from_temporary.pass.cpp @@ -8,9 +8,6 @@ // REQUIRES: std-at-least-c++23 -// These compilers don't support std::reference_converts_from_temporary yet. -// UNSUPPORTED: apple-clang-16, clang-19.1 - // // template struct reference_constructs_from_temporary; diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/reference_converts_from_temporary.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/reference_converts_from_temporary.pass.cpp index 73cc4f3e29d5a..8319d9e1563fe 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/reference_converts_from_temporary.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/reference_converts_from_temporary.pass.cpp @@ -8,9 +8,6 @@ // REQUIRES: std-at-least-c++23 -// These compilers don't support std::reference_converts_from_temporary yet. -// UNSUPPORTED: apple-clang-16, clang-19.1 - // // template struct reference_converts_from_temporary; diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.verify.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.verify.cpp index 2dfbae9138864..12d778408d5ec 100644 --- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.verify.cpp +++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.verify.cpp @@ -19,11 +19,7 @@ #include "test_macros.h" void test() { - // FreeBSD ci use clang 19.1.1, which hasn't implement __reference_constructs_from_temporary. - // The static_assert inner std::make_from_tuple will not triggered. -#if __has_builtin(__reference_constructs_from_temporary) // expected-error@*:* {{static assertion failed}} -#endif // Turns to an error since C++26 (Disallow Binding a Returned Glvalue to a Temporary https://wg21.link/P2748R5). #if TEST_STD_VER >= 26