diff --git a/libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable.compile.pass.cpp b/libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable.compile.pass.cpp --- a/libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable.compile.pass.cpp +++ b/libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable.compile.pass.cpp @@ -27,7 +27,7 @@ static_assert(std::three_way_comparable); static_assert(std::three_way_comparable); static_assert(std::three_way_comparable); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(std::three_way_comparable); #endif #ifndef TEST_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp --- a/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp +++ b/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp @@ -95,7 +95,7 @@ static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp --- a/libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp +++ b/libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp @@ -91,7 +91,7 @@ static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/numerics/bit/bit.pow.two/bit_width.pass.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/bit_width.pass.cpp --- a/libcxx/test/std/numerics/bit/bit.pow.two/bit_width.pass.cpp +++ b/libcxx/test/std/numerics/bit/bit.pow.two/bit_width.pass.cpp @@ -96,7 +96,7 @@ static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/numerics/bit/bit.pow.two/has_single_bit.pass.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/has_single_bit.pass.cpp --- a/libcxx/test/std/numerics/bit/bit.pow.two/has_single_bit.pass.cpp +++ b/libcxx/test/std/numerics/bit/bit.pow.two/has_single_bit.pass.cpp @@ -94,7 +94,7 @@ static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp --- a/libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp +++ b/libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp @@ -91,7 +91,7 @@ static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp --- a/libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp +++ b/libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp @@ -90,7 +90,7 @@ static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp --- a/libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp +++ b/libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp @@ -95,7 +95,7 @@ static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp --- a/libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp +++ b/libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp @@ -92,7 +92,7 @@ static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp b/libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp --- a/libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp +++ b/libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp @@ -102,7 +102,7 @@ static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/numerics/bit/bitops.rot/rotl.pass.cpp b/libcxx/test/std/numerics/bit/bitops.rot/rotl.pass.cpp --- a/libcxx/test/std/numerics/bit/bitops.rot/rotl.pass.cpp +++ b/libcxx/test/std/numerics/bit/bitops.rot/rotl.pass.cpp @@ -90,7 +90,7 @@ static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/numerics/bit/bitops.rot/rotr.pass.cpp b/libcxx/test/std/numerics/bit/bitops.rot/rotr.pass.cpp --- a/libcxx/test/std/numerics/bit/bitops.rot/rotr.pass.cpp +++ b/libcxx/test/std/numerics/bit/bitops.rot/rotr.pass.cpp @@ -91,7 +91,7 @@ static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(!std::is_invocable_v); #endif static_assert(!std::is_invocable_v); diff --git a/libcxx/test/std/strings/string.view/trivially_copyable.compile.pass.cpp b/libcxx/test/std/strings/string.view/trivially_copyable.compile.pass.cpp --- a/libcxx/test/std/strings/string.view/trivially_copyable.compile.pass.cpp +++ b/libcxx/test/std/strings/string.view/trivially_copyable.compile.pass.cpp @@ -19,7 +19,7 @@ #ifndef TEST_HAS_NO_WIDE_CHARACTERS static_assert(std::is_trivially_copyable >::value, ""); #endif -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T static_assert(std::is_trivially_copyable >::value, ""); #endif static_assert(std::is_trivially_copyable >::value, ""); diff --git a/libcxx/test/std/utilities/format/format.arguments/format.arg/ctor.pass.cpp b/libcxx/test/std/utilities/format/format.arguments/format.arg/ctor.pass.cpp --- a/libcxx/test/std/utilities/format/format.arguments/format.arg/ctor.pass.cpp +++ b/libcxx/test/std/utilities/format/format.arguments/format.arg/ctor.pass.cpp @@ -34,7 +34,7 @@ void test() { test(); test(); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test(); #endif #ifndef TEST_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/advance_to.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/advance_to.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/advance_to.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/advance_to.pass.cpp @@ -52,7 +52,7 @@ std::make_format_args>, wchar_t>>())); #endif -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test(std::basic_format_args( std::make_format_args>, char8_t>>())); diff --git a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp @@ -51,7 +51,7 @@ #ifndef TEST_HAS_NO_WIDE_CHARACTERS test>, wchar_t>(); #endif -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test>, char8_t>(); #endif #ifndef TEST_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/ctor.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/ctor.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/ctor.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/ctor.pass.cpp @@ -129,7 +129,7 @@ #ifndef TEST_HAS_NO_WIDE_CHARACTERS test>, wchar_t>(); #endif -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test>, char8_t>(); #endif #ifndef TEST_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/locale.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/locale.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/locale.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/locale.pass.cpp @@ -85,7 +85,7 @@ #ifndef TEST_HAS_NO_WIDE_CHARACTERS test>, wchar_t>(); #endif -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test>, char8_t>(); #endif #ifndef TEST_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/out.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/out.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/out.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/out.pass.cpp @@ -48,7 +48,7 @@ std::make_format_args>, wchar_t>>())); #endif -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test(std::basic_format_args( std::make_format_args>, char8_t>>())); diff --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/advance_to.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/advance_to.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/advance_to.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/advance_to.pass.cpp @@ -52,7 +52,7 @@ constexpr bool test() { test("abc"); test(L"abc"); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test(u8"abc"); #endif #ifndef TEST_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/begin.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/begin.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/begin.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/begin.pass.cpp @@ -38,7 +38,7 @@ constexpr bool test() { test("abc"); test(L"abc"); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test(u8"abc"); #endif #ifndef TEST_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/ctor.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/ctor.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/ctor.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/ctor.pass.cpp @@ -61,7 +61,7 @@ constexpr bool test() { test("abc"); test(L"abc"); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test(u8"abc"); #endif #ifndef TEST_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/end.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/end.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/end.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/end.pass.cpp @@ -38,7 +38,7 @@ constexpr bool test() { test("abc"); test(L"abc"); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test(u8"abc"); #endif #ifndef TEST_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/types.compile.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/types.compile.pass.cpp --- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/types.compile.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/types.compile.pass.cpp @@ -50,7 +50,7 @@ #ifndef TEST_HAS_NO_WIDE_CHARACTERS test(); #endif -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test(); #endif #ifndef TEST_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/utility/utility.intcmp/intcmp.fail.cpp b/libcxx/test/std/utilities/utility/utility.intcmp/intcmp.fail.cpp --- a/libcxx/test/std/utilities/utility/utility.intcmp/intcmp.fail.cpp +++ b/libcxx/test/std/utilities/utility/utility.intcmp/intcmp.fail.cpp @@ -72,7 +72,7 @@ std::in_range(int()); // expected-error 10-11 {{no matching function for call to 'in_range'}} std::in_range(T()); // expected-error 10-11 {{no matching function for call to 'in_range'}} } -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T template constexpr void test_char8t() { std::cmp_equal(T(), T()); // expected-error 1 {{no matching function for call to 'cmp_equal'}} @@ -96,7 +96,7 @@ std::in_range(int()); // expected-error 1 {{no matching function for call to 'in_range'}} std::in_range(T()); // expected-error 1 {{no matching function for call to 'in_range'}} } -#endif // _LIBCPP_HAS_NO_CHAR8_T +#endif // TEST_HAS_NO_CHAR8_T #ifndef TEST_HAS_NO_UNICODE_CHARS template @@ -139,9 +139,9 @@ test(); test(); -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#ifndef TEST_HAS_NO_CHAR8_T test_char8t(); -#endif // _LIBCPP_HAS_NO_CHAR8_T +#endif // TEST_HAS_NO_CHAR8_T #ifndef TEST_HAS_NO_UNICODE_CHARS test_uchars(); diff --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h --- a/libcxx/test/support/test_macros.h +++ b/libcxx/test/support/test_macros.h @@ -380,6 +380,10 @@ # define TEST_HAS_NO_LOCALIZATION #endif +#if TEST_STD_VER <= 17 || !defined(__cpp_char8_t) +# define TEST_HAS_NO_CHAR8_T +#endif + #if defined(__GNUC__) #pragma GCC diagnostic pop #endif