diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits index 8f1dd68daa46..c5a24a47af95 100644 --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -1378,6 +1378,11 @@ template struct _LIBCPP_TYPE_VIS_ONLY has_virtual_destructor #endif +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template _LIBCPP_CONSTEXPR bool has_virtual_destructor_v + = has_virtual_destructor<_Tp>::value; +#endif + // alignment_of template struct _LIBCPP_TYPE_VIS_ONLY alignment_of @@ -1905,12 +1910,22 @@ template struct is_assignable : public __is_assignable_imp<_Tp, _Arg> {}; +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template _LIBCPP_CONSTEXPR bool is_assignable_v + = is_assignable<_Tp, _Arg>::value; +#endif + // is_copy_assignable template struct _LIBCPP_TYPE_VIS_ONLY is_copy_assignable : public is_assignable::type, typename add_lvalue_reference::type>::type> {}; +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template _LIBCPP_CONSTEXPR bool is_copy_assignable_v + = is_copy_assignable<_Tp>::value; +#endif + // is_move_assignable template struct _LIBCPP_TYPE_VIS_ONLY is_move_assignable @@ -1921,6 +1936,11 @@ template struct _LIBCPP_TYPE_VIS_ONLY is_move_assignable : public is_copy_assignable<_Tp> {}; #endif +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template _LIBCPP_CONSTEXPR bool is_move_assignable_v + = is_move_assignable<_Tp>::value; +#endif + // is_destructible // if it's a reference, return true @@ -1979,6 +1999,11 @@ template <> struct is_destructible : public _VSTD::false_type {}; +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template _LIBCPP_CONSTEXPR bool is_destructible_v + = is_destructible<_Tp>::value; +#endif + // move #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES @@ -3013,6 +3038,11 @@ struct __is_constructible2_imp #endif // _LIBCPP_HAS_NO_VARIADICS #endif // __has_feature(is_constructible) +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) && !defined(_LIBCPP_HAS_NO_VARIADICS) +template _LIBCPP_CONSTEXPR bool is_constructible_v + = is_constructible<_Tp, _Args...>::value; +#endif + // is_default_constructible template @@ -3020,6 +3050,11 @@ struct _LIBCPP_TYPE_VIS_ONLY is_default_constructible : public is_constructible<_Tp> {}; +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template _LIBCPP_CONSTEXPR bool is_default_constructible_v + = is_default_constructible<_Tp>::value; +#endif + // is_copy_constructible template @@ -3027,6 +3062,11 @@ struct _LIBCPP_TYPE_VIS_ONLY is_copy_constructible : public is_constructible<_Tp, typename add_lvalue_reference::type>::type> {}; +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template _LIBCPP_CONSTEXPR bool is_copy_constructible_v + = is_copy_constructible<_Tp>::value; +#endif + // is_move_constructible template @@ -3038,6 +3078,11 @@ struct _LIBCPP_TYPE_VIS_ONLY is_move_constructible #endif {}; +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template _LIBCPP_CONSTEXPR bool is_move_constructible_v + = is_move_constructible<_Tp>::value; +#endif + // is_trivially_constructible #ifndef _LIBCPP_HAS_NO_VARIADICS @@ -3165,18 +3210,33 @@ struct _LIBCPP_TYPE_VIS_ONLY is_trivially_constructible<_Tp, _Tp&, #endif // _LIBCPP_HAS_NO_VARIADICS +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) && !defined(_LIBCPP_HAS_NO_VARIADICS) +template _LIBCPP_CONSTEXPR bool is_trivially_constructible_v + = is_trivially_constructible<_Tp>::value; +#endif + // is_trivially_default_constructible template struct _LIBCPP_TYPE_VIS_ONLY is_trivially_default_constructible : public is_trivially_constructible<_Tp> {}; +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template _LIBCPP_CONSTEXPR bool is_trivially_default_constructible_v + = is_trivially_default_constructible<_Tp>::value; +#endif + // is_trivially_copy_constructible template struct _LIBCPP_TYPE_VIS_ONLY is_trivially_copy_constructible : public is_trivially_constructible<_Tp, typename add_lvalue_reference::type> {}; +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template _LIBCPP_CONSTEXPR bool is_trivially_copy_constructible_v + = is_trivially_copy_constructible<_Tp>::value; +#endif + // is_trivially_move_constructible template struct _LIBCPP_TYPE_VIS_ONLY is_trivially_move_constructible @@ -3187,6 +3247,11 @@ template struct _LIBCPP_TYPE_VIS_ONLY is_trivially_move_constructibl #endif {}; +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template _LIBCPP_CONSTEXPR bool is_trivially_move_constructible_v + = is_trivially_move_constructible<_Tp>::value; +#endif + // is_trivially_assignable #if __has_feature(is_trivially_assignable) || _GNUC_VER >= 501 @@ -3225,12 +3290,22 @@ struct is_trivially_assignable<_Tp&, _Tp&&> #endif // !__has_feature(is_trivially_assignable) +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template _LIBCPP_CONSTEXPR bool is_trivially_assignable_v + = is_trivially_assignable<_Tp, _Arg>::value; +#endif + // is_trivially_copy_assignable template struct _LIBCPP_TYPE_VIS_ONLY is_trivially_copy_assignable : public is_trivially_assignable::type, typename add_lvalue_reference::type>::type> {}; +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template _LIBCPP_CONSTEXPR bool is_trivially_copy_assignable_v + = is_trivially_copy_assignable<_Tp>::value; +#endif + // is_trivially_move_assignable template struct _LIBCPP_TYPE_VIS_ONLY is_trivially_move_assignable @@ -3242,6 +3317,11 @@ template struct _LIBCPP_TYPE_VIS_ONLY is_trivially_move_assignable #endif {}; +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template _LIBCPP_CONSTEXPR bool is_trivially_move_assignable_v + = is_trivially_move_assignable<_Tp>::value; +#endif + // is_trivially_destructible #if __has_feature(has_trivial_destructor) || (_GNUC_VER >= 403) @@ -3263,6 +3343,11 @@ template struct _LIBCPP_TYPE_VIS_ONLY is_trivially_destructible<_Tp[ #endif +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template _LIBCPP_CONSTEXPR bool is_trivially_destructible_v + = is_trivially_destructible<_Tp>::value; +#endif + // is_nothrow_constructible #if 0 @@ -3423,18 +3508,33 @@ struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp, _Tp&, #endif // _LIBCPP_HAS_NO_VARIADICS #endif // __has_feature(is_nothrow_constructible) +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) && !defined(_LIBCPP_HAS_NO_VARIADICS) +template _LIBCPP_CONSTEXPR bool is_nothrow_constructible_v + = is_nothrow_constructible<_Tp, _Args...>::value; +#endif + // is_nothrow_default_constructible template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_default_constructible : public is_nothrow_constructible<_Tp> {}; +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template _LIBCPP_CONSTEXPR bool is_nothrow_default_constructible_v + = is_nothrow_default_constructible<_Tp>::value; +#endif + // is_nothrow_copy_constructible template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_copy_constructible : public is_nothrow_constructible<_Tp, typename add_lvalue_reference::type>::type> {}; +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template _LIBCPP_CONSTEXPR bool is_nothrow_copy_constructible_v + = is_nothrow_copy_constructible<_Tp>::value; +#endif + // is_nothrow_move_constructible template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_move_constructible @@ -3445,6 +3545,11 @@ template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_move_constructible #endif {}; +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template _LIBCPP_CONSTEXPR bool is_nothrow_move_constructible_v + = is_nothrow_move_constructible<_Tp>::value; +#endif + // is_nothrow_assignable #if __has_feature(cxx_noexcept) || (_GNUC_VER >= 407 && __cplusplus >= 201103L) @@ -3513,6 +3618,11 @@ struct is_nothrow_assignable<_Tp&, _Tp&&> #endif // __has_feature(cxx_noexcept) +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template _LIBCPP_CONSTEXPR bool is_nothrow_assignable_v + = is_nothrow_assignable<_Tp, _Arg>::value; +#endif + // is_nothrow_copy_assignable template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_copy_assignable @@ -3530,6 +3640,11 @@ template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_move_assignable #endif {}; +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template _LIBCPP_CONSTEXPR bool is_nothrow_copy_assignable_v + = is_nothrow_copy_assignable<_Tp>::value; +#endif + // is_nothrow_destructible #if __has_feature(cxx_noexcept) || (_GNUC_VER >= 407 && __cplusplus >= 201103L) @@ -3591,6 +3706,11 @@ struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_destructible<_Tp[]> #endif +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template _LIBCPP_CONSTEXPR bool is_nothrow_destructible_v + = is_nothrow_destructible<_Tp>::value; +#endif + // is_pod #if __has_feature(is_pod) || (_GNUC_VER >= 403) diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_virtual_destructor.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_virtual_destructor.pass.cpp index 685d30de692f..36020139ec58 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_virtual_destructor.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_virtual_destructor.pass.cpp @@ -20,6 +20,12 @@ void test_has_virtual_destructor() static_assert( std::has_virtual_destructor::value, ""); static_assert( std::has_virtual_destructor::value, ""); static_assert( std::has_virtual_destructor::value, ""); +#if TEST_STD_VER > 14 + static_assert( std::has_virtual_destructor_v, ""); + static_assert( std::has_virtual_destructor_v, ""); + static_assert( std::has_virtual_destructor_v, ""); + static_assert( std::has_virtual_destructor_v, ""); +#endif } template @@ -29,6 +35,12 @@ void test_has_not_virtual_destructor() static_assert(!std::has_virtual_destructor::value, ""); static_assert(!std::has_virtual_destructor::value, ""); static_assert(!std::has_virtual_destructor::value, ""); +#if TEST_STD_VER > 14 + static_assert(!std::has_virtual_destructor_v, ""); + static_assert(!std::has_virtual_destructor_v, ""); + static_assert(!std::has_virtual_destructor_v, ""); + static_assert(!std::has_virtual_destructor_v, ""); +#endif } class Empty diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp index d33019bcba9e..fbe36618aac2 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp @@ -26,12 +26,18 @@ template void test_is_assignable() { static_assert(( std::is_assignable::value), ""); +#if TEST_STD_VER > 14 + static_assert( std::is_assignable_v, ""); +#endif } template void test_is_not_assignable() { static_assert((!std::is_assignable::value), ""); +#if TEST_STD_VER > 14 + static_assert( !std::is_assignable_v, ""); +#endif } struct D; diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp index 2b8f7efec602..606cd974c478 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp @@ -38,30 +38,45 @@ template void test_is_constructible() { static_assert( (std::is_constructible::value), ""); +#if TEST_STD_VER > 14 + static_assert( std::is_constructible_v, ""); +#endif } template void test_is_constructible() { - static_assert( (std::is_constructible::value), ""); + static_assert(( std::is_constructible::value), ""); +#if TEST_STD_VER > 14 + static_assert(( std::is_constructible_v), ""); +#endif } template void test_is_constructible() { - static_assert( (std::is_constructible::value), ""); + static_assert(( std::is_constructible::value), ""); +#if TEST_STD_VER > 14 + static_assert(( std::is_constructible_v), ""); +#endif } template void test_is_not_constructible() { static_assert((!std::is_constructible::value), ""); +#if TEST_STD_VER > 14 + static_assert((!std::is_constructible_v), ""); +#endif } template void test_is_not_constructible() { static_assert((!std::is_constructible::value), ""); +#if TEST_STD_VER > 14 + static_assert((!std::is_constructible_v), ""); +#endif } int main() diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_copy_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_copy_assignable.pass.cpp index c43d59479fb2..904e8513fc42 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_copy_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_copy_assignable.pass.cpp @@ -17,12 +17,18 @@ template void test_is_copy_assignable() { static_assert(( std::is_copy_assignable::value), ""); +#if TEST_STD_VER > 14 + static_assert(( std::is_copy_assignable_v), ""); +#endif } template void test_is_not_copy_assignable() { static_assert((!std::is_copy_assignable::value), ""); +#if TEST_STD_VER > 14 + static_assert((!std::is_copy_assignable_v), ""); +#endif } class Empty diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_copy_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_copy_constructible.pass.cpp index f878a50c3af5..5d684961a6b8 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_copy_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_copy_constructible.pass.cpp @@ -17,12 +17,18 @@ template void test_is_copy_constructible() { static_assert( std::is_copy_constructible::value, ""); +#if TEST_STD_VER > 14 + static_assert( std::is_copy_constructible_v, ""); +#endif } template void test_is_not_copy_constructible() { static_assert(!std::is_copy_constructible::value, ""); +#if TEST_STD_VER > 14 + static_assert(!std::is_copy_constructible_v, ""); +#endif } class Empty diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_default_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_default_constructible.pass.cpp index c8d5c42fbf89..b0d6b0370e3a 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_default_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_default_constructible.pass.cpp @@ -20,6 +20,12 @@ void test_is_default_constructible() static_assert( std::is_default_constructible::value, ""); static_assert( std::is_default_constructible::value, ""); static_assert( std::is_default_constructible::value, ""); +#if TEST_STD_VER > 14 + static_assert( std::is_default_constructible_v, ""); + static_assert( std::is_default_constructible_v, ""); + static_assert( std::is_default_constructible_v, ""); + static_assert( std::is_default_constructible_v, ""); +#endif } template @@ -29,6 +35,12 @@ void test_is_not_default_constructible() static_assert(!std::is_default_constructible::value, ""); static_assert(!std::is_default_constructible::value, ""); static_assert(!std::is_default_constructible::value, ""); +#if TEST_STD_VER > 14 + static_assert(!std::is_default_constructible_v, ""); + static_assert(!std::is_default_constructible_v, ""); + static_assert(!std::is_default_constructible_v, ""); + static_assert(!std::is_default_constructible_v, ""); +#endif } class Empty diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp index fae9557dbe3e..772d3eabb9dd 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_destructible.pass.cpp @@ -22,6 +22,12 @@ void test_is_destructible() static_assert( std::is_destructible::value, ""); static_assert( std::is_destructible::value, ""); static_assert( std::is_destructible::value, ""); +#if TEST_STD_VER > 14 + static_assert( std::is_destructible_v, ""); + static_assert( std::is_destructible_v, ""); + static_assert( std::is_destructible_v, ""); + static_assert( std::is_destructible_v, ""); +#endif } template @@ -31,6 +37,12 @@ void test_is_not_destructible() static_assert(!std::is_destructible::value, ""); static_assert(!std::is_destructible::value, ""); static_assert(!std::is_destructible::value, ""); +#if TEST_STD_VER > 14 + static_assert(!std::is_destructible_v, ""); + static_assert(!std::is_destructible_v, ""); + static_assert(!std::is_destructible_v, ""); + static_assert(!std::is_destructible_v, ""); +#endif } class Empty {}; diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp index 3b55c05958d1..d7b7f16cbe08 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp @@ -79,7 +79,7 @@ int main() // In C++14, cv-void is is a literal type #if TEST_STD_VER < 14 test_is_not_literal_type(); -#else TEST_STD_VER > 14 +#elif TEST_STD_VER > 14 test_is_literal_type(); #endif diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_assignable.pass.cpp index a89ee7d4e490..78e27368c622 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_assignable.pass.cpp @@ -16,13 +16,19 @@ template void test_is_move_assignable() { - static_assert( std::is_move_assignable::value, ""); + static_assert(( std::is_move_assignable::value), ""); +#if TEST_STD_VER > 14 + static_assert(( std::is_move_assignable_v), ""); +#endif } template void test_is_not_move_assignable() { - static_assert(!std::is_move_assignable::value, ""); + static_assert((!std::is_move_assignable::value), ""); +#if TEST_STD_VER > 14 + static_assert((!std::is_move_assignable_v), ""); +#endif } class Empty diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_constructible.pass.cpp index 7409ebaa56c8..0609db7e8455 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_move_constructible.pass.cpp @@ -17,12 +17,18 @@ template void test_is_move_constructible() { static_assert( std::is_move_constructible::value, ""); +#if TEST_STD_VER > 14 + static_assert( std::is_move_constructible_v, ""); +#endif } template void test_is_not_move_constructible() { static_assert(!std::is_move_constructible::value, ""); +#if TEST_STD_VER > 14 + static_assert(!std::is_move_constructible_v, ""); +#endif } class Empty diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp index 8fff5f8b3de3..9bd1b09f26e1 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_assignable.pass.cpp @@ -17,12 +17,18 @@ template void test_is_nothrow_assignable() { static_assert(( std::is_nothrow_assignable::value), ""); +#if TEST_STD_VER > 14 + static_assert(( std::is_nothrow_assignable_v), ""); +#endif } template void test_is_not_nothrow_assignable() { static_assert((!std::is_nothrow_assignable::value), ""); +#if TEST_STD_VER > 14 + static_assert((!std::is_nothrow_assignable_v), ""); +#endif } struct A diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_constructible.pass.cpp index fe0b5673bc44..f2c1d6626986 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_constructible.pass.cpp @@ -18,30 +18,45 @@ template void test_is_nothrow_constructible() { static_assert(( std::is_nothrow_constructible::value), ""); +#if TEST_STD_VER > 14 + static_assert(( std::is_nothrow_constructible_v), ""); +#endif } template void test_is_nothrow_constructible() { static_assert(( std::is_nothrow_constructible::value), ""); +#if TEST_STD_VER > 14 + static_assert(( std::is_nothrow_constructible_v), ""); +#endif } template void test_is_not_nothrow_constructible() { static_assert((!std::is_nothrow_constructible::value), ""); +#if TEST_STD_VER > 14 + static_assert((!std::is_nothrow_constructible_v), ""); +#endif } template void test_is_not_nothrow_constructible() { static_assert((!std::is_nothrow_constructible::value), ""); +#if TEST_STD_VER > 14 + static_assert((!std::is_nothrow_constructible_v), ""); +#endif } template void test_is_not_nothrow_constructible() { static_assert((!std::is_nothrow_constructible::value), ""); +#if TEST_STD_VER > 14 + static_assert((!std::is_nothrow_constructible_v), ""); +#endif } class Empty diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_assignable.pass.cpp index d843803cf21d..85e5e4f1d6ea 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_assignable.pass.cpp @@ -17,12 +17,18 @@ template void test_has_nothrow_assign() { static_assert( std::is_nothrow_copy_assignable::value, ""); +#if TEST_STD_VER > 14 + static_assert( std::is_nothrow_copy_assignable_v, ""); +#endif } template void test_has_not_nothrow_assign() { static_assert(!std::is_nothrow_copy_assignable::value, ""); +#if TEST_STD_VER > 14 + static_assert(!std::is_nothrow_copy_assignable_v, ""); +#endif } class Empty diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible.pass.cpp index 99fce65dcc7e..7070c59e3996 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_copy_constructible.pass.cpp @@ -18,6 +18,10 @@ void test_is_nothrow_copy_constructible() { static_assert( std::is_nothrow_copy_constructible::value, ""); static_assert( std::is_nothrow_copy_constructible::value, ""); +#if TEST_STD_VER > 14 + static_assert( std::is_nothrow_copy_constructible_v, ""); + static_assert( std::is_nothrow_copy_constructible_v, ""); +#endif } template @@ -27,6 +31,12 @@ void test_has_not_nothrow_copy_constructor() static_assert(!std::is_nothrow_copy_constructible::value, ""); static_assert(!std::is_nothrow_copy_constructible::value, ""); static_assert(!std::is_nothrow_copy_constructible::value, ""); +#if TEST_STD_VER > 14 + static_assert(!std::is_nothrow_copy_constructible_v, ""); + static_assert(!std::is_nothrow_copy_constructible_v, ""); + static_assert(!std::is_nothrow_copy_constructible_v, ""); + static_assert(!std::is_nothrow_copy_constructible_v, ""); +#endif } class Empty diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp index 1550dff08bb5..e6612753237c 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp @@ -20,6 +20,12 @@ void test_is_nothrow_default_constructible() static_assert( std::is_nothrow_default_constructible::value, ""); static_assert( std::is_nothrow_default_constructible::value, ""); static_assert( std::is_nothrow_default_constructible::value, ""); +#if TEST_STD_VER > 14 + static_assert( std::is_nothrow_default_constructible_v, ""); + static_assert( std::is_nothrow_default_constructible_v, ""); + static_assert( std::is_nothrow_default_constructible_v, ""); + static_assert( std::is_nothrow_default_constructible_v, ""); +#endif } template @@ -29,6 +35,12 @@ void test_has_not_nothrow_default_constructor() static_assert(!std::is_nothrow_default_constructible::value, ""); static_assert(!std::is_nothrow_default_constructible::value, ""); static_assert(!std::is_nothrow_default_constructible::value, ""); +#if TEST_STD_VER > 14 + static_assert(!std::is_nothrow_default_constructible_v, ""); + static_assert(!std::is_nothrow_default_constructible_v, ""); + static_assert(!std::is_nothrow_default_constructible_v, ""); + static_assert(!std::is_nothrow_default_constructible_v, ""); +#endif } class Empty diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_destructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_destructible.pass.cpp index 5827c927f11f..6f96d7327b4a 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_destructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_destructible.pass.cpp @@ -22,6 +22,12 @@ void test_is_nothrow_destructible() static_assert( std::is_nothrow_destructible::value, ""); static_assert( std::is_nothrow_destructible::value, ""); static_assert( std::is_nothrow_destructible::value, ""); +#if TEST_STD_VER > 14 + static_assert( std::is_nothrow_destructible_v, ""); + static_assert( std::is_nothrow_destructible_v, ""); + static_assert( std::is_nothrow_destructible_v, ""); + static_assert( std::is_nothrow_destructible_v, ""); +#endif } template @@ -31,6 +37,12 @@ void test_is_not_nothrow_destructible() static_assert(!std::is_nothrow_destructible::value, ""); static_assert(!std::is_nothrow_destructible::value, ""); static_assert(!std::is_nothrow_destructible::value, ""); +#if TEST_STD_VER > 14 + static_assert(!std::is_nothrow_destructible_v, ""); + static_assert(!std::is_nothrow_destructible_v, ""); + static_assert(!std::is_nothrow_destructible_v, ""); + static_assert(!std::is_nothrow_destructible_v, ""); +#endif } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_assignable.pass.cpp index fe51e438864f..ee0ba7d577f7 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_assignable.pass.cpp @@ -17,12 +17,18 @@ template void test_has_nothrow_assign() { static_assert( std::is_nothrow_move_assignable::value, ""); +#if TEST_STD_VER > 14 + static_assert( std::is_nothrow_move_assignable_v, ""); +#endif } template void test_has_not_nothrow_assign() { static_assert(!std::is_nothrow_move_assignable::value, ""); +#if TEST_STD_VER > 14 + static_assert( std::is_nothrow_move_assignable_v, ""); +#endif } class Empty diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible.pass.cpp index f5a42afe0d50..3686af729a65 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_move_constructible.pass.cpp @@ -18,6 +18,10 @@ void test_is_nothrow_move_constructible() { static_assert( std::is_nothrow_move_constructible::value, ""); static_assert( std::is_nothrow_move_constructible::value, ""); +#if TEST_STD_VER > 14 + static_assert( std::is_nothrow_move_constructible_v, ""); + static_assert( std::is_nothrow_move_constructible_v, ""); +#endif } template @@ -27,6 +31,12 @@ void test_has_not_nothrow_move_constructor() static_assert(!std::is_nothrow_move_constructible::value, ""); static_assert(!std::is_nothrow_move_constructible::value, ""); static_assert(!std::is_nothrow_move_constructible::value, ""); +#if TEST_STD_VER > 14 + static_assert(!std::is_nothrow_move_constructible_v, ""); + static_assert(!std::is_nothrow_move_constructible_v, ""); + static_assert(!std::is_nothrow_move_constructible_v, ""); + static_assert(!std::is_nothrow_move_constructible_v, ""); +#endif } class Empty diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable.pass.cpp index 735d05fa6ee4..3b89cf89bc17 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_assignable.pass.cpp @@ -17,12 +17,18 @@ template void test_is_trivially_assignable() { static_assert(( std::is_trivially_assignable::value), ""); +#if TEST_STD_VER > 14 + static_assert(( std::is_trivially_assignable_v), ""); +#endif } template void test_is_not_trivially_assignable() { static_assert((!std::is_trivially_assignable::value), ""); +#if TEST_STD_VER > 14 + static_assert((!std::is_trivially_assignable_v), ""); +#endif } struct A diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_constructible.pass.cpp index 4171d4d32f5d..b15ae744fc14 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_constructible.pass.cpp @@ -18,30 +18,45 @@ template void test_is_trivially_constructible() { static_assert(( std::is_trivially_constructible::value), ""); +#if TEST_STD_VER > 14 + static_assert(( std::is_trivially_constructible_v), ""); +#endif } template void test_is_trivially_constructible() { static_assert(( std::is_trivially_constructible::value), ""); +#if TEST_STD_VER > 14 + static_assert(( std::is_trivially_constructible_v), ""); +#endif } template void test_is_not_trivially_constructible() { static_assert((!std::is_trivially_constructible::value), ""); +#if TEST_STD_VER > 14 + static_assert((!std::is_trivially_constructible_v), ""); +#endif } template void test_is_not_trivially_constructible() { static_assert((!std::is_trivially_constructible::value), ""); +#if TEST_STD_VER > 14 + static_assert((!std::is_trivially_constructible_v), ""); +#endif } template void test_is_not_trivially_constructible() { static_assert((!std::is_trivially_constructible::value), ""); +#if TEST_STD_VER > 14 + static_assert((!std::is_trivially_constructible_v), ""); +#endif } struct A diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_assignable.pass.cpp index 7d72565e40ca..a7487b233392 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_assignable.pass.cpp @@ -17,12 +17,18 @@ template void test_has_trivially_copy_assignable() { static_assert( std::is_trivially_copy_assignable::value, ""); +#if TEST_STD_VER > 14 + static_assert( std::is_trivially_copy_assignable_v, ""); +#endif } template void test_has_not_trivially_copy_assignable() { static_assert(!std::is_trivially_copy_assignable::value, ""); +#if TEST_STD_VER > 14 + static_assert(!std::is_trivially_copy_assignable_v, ""); +#endif } class Empty diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_constructible.pass.cpp index 6bd78ec9e7a1..53259f82803f 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_copy_constructible.pass.cpp @@ -18,6 +18,10 @@ void test_is_trivially_copy_constructible() { static_assert( std::is_trivially_copy_constructible::value, ""); static_assert( std::is_trivially_copy_constructible::value, ""); +#if TEST_STD_VER > 14 + static_assert( std::is_trivially_copy_constructible_v, ""); + static_assert( std::is_trivially_copy_constructible_v, ""); +#endif } template @@ -25,6 +29,10 @@ void test_has_not_trivial_copy_constructor() { static_assert(!std::is_trivially_copy_constructible::value, ""); static_assert(!std::is_trivially_copy_constructible::value, ""); +#if TEST_STD_VER > 14 + static_assert(!std::is_trivially_copy_constructible_v, ""); + static_assert(!std::is_trivially_copy_constructible_v, ""); +#endif } class Empty diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_default_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_default_constructible.pass.cpp index 1f63401dacb7..5d379e47cb2f 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_default_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_default_constructible.pass.cpp @@ -20,6 +20,12 @@ void test_is_trivially_default_constructible() static_assert( std::is_trivially_default_constructible::value, ""); static_assert( std::is_trivially_default_constructible::value, ""); static_assert( std::is_trivially_default_constructible::value, ""); +#if TEST_STD_VER > 14 + static_assert( std::is_trivially_default_constructible_v, ""); + static_assert( std::is_trivially_default_constructible_v, ""); + static_assert( std::is_trivially_default_constructible_v, ""); + static_assert( std::is_trivially_default_constructible_v, ""); +#endif } template @@ -29,6 +35,12 @@ void test_has_not_trivial_default_constructor() static_assert(!std::is_trivially_default_constructible::value, ""); static_assert(!std::is_trivially_default_constructible::value, ""); static_assert(!std::is_trivially_default_constructible::value, ""); +#if TEST_STD_VER > 14 + static_assert(!std::is_trivially_default_constructible_v, ""); + static_assert(!std::is_trivially_default_constructible_v, ""); + static_assert(!std::is_trivially_default_constructible_v, ""); + static_assert(!std::is_trivially_default_constructible_v, ""); +#endif } class Empty diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_destructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_destructible.pass.cpp index 0908f8b2b426..a0c09d2221ed 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_destructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_destructible.pass.cpp @@ -22,6 +22,12 @@ void test_is_trivially_destructible() static_assert( std::is_trivially_destructible::value, ""); static_assert( std::is_trivially_destructible::value, ""); static_assert( std::is_trivially_destructible::value, ""); +#if TEST_STD_VER > 14 + static_assert( std::is_trivially_destructible_v, ""); + static_assert( std::is_trivially_destructible_v, ""); + static_assert( std::is_trivially_destructible_v, ""); + static_assert( std::is_trivially_destructible_v, ""); +#endif } template @@ -31,6 +37,12 @@ void test_is_not_trivially_destructible() static_assert(!std::is_trivially_destructible::value, ""); static_assert(!std::is_trivially_destructible::value, ""); static_assert(!std::is_trivially_destructible::value, ""); +#if TEST_STD_VER > 14 + static_assert(!std::is_trivially_destructible_v, ""); + static_assert(!std::is_trivially_destructible_v, ""); + static_assert(!std::is_trivially_destructible_v, ""); + static_assert(!std::is_trivially_destructible_v, ""); +#endif } struct PublicDestructor { public: ~PublicDestructor() {}}; diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_assignable.pass.cpp index c3fc7ac0a3df..8f00da999283 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_assignable.pass.cpp @@ -17,12 +17,18 @@ template void test_has_trivial_assign() { static_assert( std::is_trivially_move_assignable::value, ""); +#if TEST_STD_VER > 14 + static_assert( std::is_trivially_move_assignable_v, ""); +#endif } template void test_has_not_trivial_assign() { static_assert(!std::is_trivially_move_assignable::value, ""); +#if TEST_STD_VER > 14 + static_assert(!std::is_trivially_move_assignable_v, ""); +#endif } class Empty diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_constructible.pass.cpp index 54cb5e853a81..477085dcb778 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_trivially_move_constructible.pass.cpp @@ -17,12 +17,18 @@ template void test_is_trivially_move_constructible() { static_assert( std::is_trivially_move_constructible::value, ""); +#if TEST_STD_VER > 14 + static_assert( std::is_trivially_move_constructible_v, ""); +#endif } template void test_has_not_trivial_move_constructor() { static_assert(!std::is_trivially_move_constructible::value, ""); +#if TEST_STD_VER > 14 + static_assert(!std::is_trivially_move_constructible_v, ""); +#endif } class Empty