diff --git a/libcxx/include/__config b/libcxx/include/__config --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -914,10 +914,6 @@ #define _LIBCPP_WCTYPE_IS_MASK #endif -#if _LIBCPP_STD_VER <= 17 || !defined(__cpp_char8_t) -#define _LIBCPP_HAS_NO_CHAR8_T -#endif - // Deprecation macros. // // Deprecations warnings are always enabled, except when users explicitly opt-out @@ -958,7 +954,7 @@ # define _LIBCPP_DEPRECATED_IN_CXX20 #endif -#if !defined(_LIBCPP_HAS_NO_CHAR8_T) +#if _LIBCPP_STD_VER <= 17 # define _LIBCPP_DEPRECATED_WITH_CHAR8_T _LIBCPP_DEPRECATED #else # define _LIBCPP_DEPRECATED_WITH_CHAR8_T diff --git a/libcxx/include/__functional/hash.h b/libcxx/include/__functional/hash.h --- a/libcxx/include/__functional/hash.h +++ b/libcxx/include/__functional/hash.h @@ -507,7 +507,6 @@ size_t operator()(unsigned char __v) const _NOEXCEPT {return static_cast(__v);} }; -#ifndef _LIBCPP_HAS_NO_CHAR8_T _LIBCPP_SUPPRESS_DEPRECATED_PUSH template <> struct _LIBCPP_TEMPLATE_VIS hash @@ -523,7 +522,6 @@ _LIBCPP_INLINE_VISIBILITY size_t operator()(char8_t __v) const _NOEXCEPT {return static_cast(__v);} }; -#endif // !_LIBCPP_HAS_NO_CHAR8_T #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/include/__locale b/libcxx/include/__locale --- a/libcxx/include/__locale +++ b/libcxx/include/__locale @@ -1159,7 +1159,7 @@ virtual int do_max_length() const _NOEXCEPT; }; -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 // template <> class codecvt // C++20 @@ -1247,7 +1247,7 @@ virtual int do_max_length() const _NOEXCEPT; }; -#endif +#endif // _LIBCPP_STD_VER > 17 // template <> class codecvt // deprecated in C++20 @@ -1335,7 +1335,7 @@ virtual int do_max_length() const _NOEXCEPT; }; -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 // template <> class codecvt // C++20 @@ -1423,7 +1423,7 @@ virtual int do_max_length() const _NOEXCEPT; }; -#endif +#endif // _LIBCPP_STD_VER > 17 // template class codecvt_byname @@ -1453,7 +1453,7 @@ _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname) _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname) // deprecated in C++20 _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname) // deprecated in C++20 -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname) // C++20 _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname) // C++20 #endif diff --git a/libcxx/include/__string b/libcxx/include/__string --- a/libcxx/include/__string +++ b/libcxx/include/__string @@ -551,7 +551,7 @@ #endif } -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 template <> struct _LIBCPP_TEMPLATE_VIS char_traits @@ -660,7 +660,7 @@ return nullptr; } -#endif // #_LIBCPP_HAS_NO_CHAR8_T +#endif // _LIBCPP_STD_VER > 17 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/include/__utility/cmp.h b/libcxx/include/__utility/cmp.h --- a/libcxx/include/__utility/cmp.h +++ b/libcxx/include/__utility/cmp.h @@ -30,10 +30,7 @@ template concept __is_safe_integral_cmp = is_integral_v<_Tp> && - !_IsSameAsAny<_Tp, bool, char, -#ifndef _LIBCPP_HAS_NO_CHAR8_T - char8_t, -#endif + !_IsSameAsAny<_Tp, bool, char, char8_t, #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS char16_t, char32_t, #endif diff --git a/libcxx/include/atomic b/libcxx/include/atomic --- a/libcxx/include/atomic +++ b/libcxx/include/atomic @@ -1137,7 +1137,7 @@ #if defined(__CLANG_ATOMIC_BOOL_LOCK_FREE) # define ATOMIC_BOOL_LOCK_FREE __CLANG_ATOMIC_BOOL_LOCK_FREE # define ATOMIC_CHAR_LOCK_FREE __CLANG_ATOMIC_CHAR_LOCK_FREE -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 # define ATOMIC_CHAR8_T_LOCK_FREE __CLANG_ATOMIC_CHAR8_T_LOCK_FREE #endif # define ATOMIC_CHAR16_T_LOCK_FREE __CLANG_ATOMIC_CHAR16_T_LOCK_FREE @@ -1151,7 +1151,7 @@ #elif defined(__GCC_ATOMIC_BOOL_LOCK_FREE) # define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE # define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 # define ATOMIC_CHAR8_T_LOCK_FREE __GCC_ATOMIC_CHAR8_T_LOCK_FREE #endif # define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE @@ -1468,7 +1468,7 @@ template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_CHAR_LOCK_FREE }; }; template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_CHAR_LOCK_FREE }; }; template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_CHAR_LOCK_FREE }; }; -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_CHAR8_T_LOCK_FREE }; }; #endif template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_CHAR16_T_LOCK_FREE }; }; @@ -2756,7 +2756,7 @@ typedef atomic atomic_ulong; typedef atomic atomic_llong; typedef atomic atomic_ullong; -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 typedef atomic atomic_char8_t; #endif typedef atomic atomic_char16_t; diff --git a/libcxx/include/cstddef b/libcxx/include/cstddef --- a/libcxx/include/cstddef +++ b/libcxx/include/cstddef @@ -59,7 +59,7 @@ template <> struct __libcpp_is_integral { enum { value = 1 }; }; template <> struct __libcpp_is_integral { enum { value = 1 }; }; template <> struct __libcpp_is_integral { enum { value = 1 }; }; -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 template <> struct __libcpp_is_integral { enum { value = 1 }; }; #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/include/filesystem b/libcxx/include/filesystem --- a/libcxx/include/filesystem +++ b/libcxx/include/filesystem @@ -558,7 +558,7 @@ static const bool value = true; using __char_type = wchar_t; }; -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 template <> struct __can_convert_char { static const bool value = true; @@ -586,7 +586,7 @@ #endif } -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 typedef u8string __u8_string; #else typedef string __u8_string; @@ -893,7 +893,7 @@ } }; -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 template <> struct _PathExport { typedef __narrow_to_utf8 _Narrower; @@ -903,7 +903,7 @@ _Narrower()(back_inserter(__dest), __src.data(), __src.data() + __src.size()); } }; -#endif /* !_LIBCPP_HAS_NO_CHAR8_T */ +#endif /* _LIBCPP_STD_VER > 17 */ #endif /* _LIBCPP_WIN32API */ class _LIBCPP_TYPE_VIS path { @@ -1264,7 +1264,7 @@ #else /* _LIBCPP_WIN32API */ _LIBCPP_INLINE_VISIBILITY _VSTD::string string() const { return __pn_; } -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 _LIBCPP_INLINE_VISIBILITY _VSTD::u8string u8string() const { return _VSTD::u8string(__pn_.begin(), __pn_.end()); } #else _LIBCPP_INLINE_VISIBILITY _VSTD::string u8string() const { return __pn_; } @@ -1296,7 +1296,7 @@ // generic format observers _VSTD::string generic_string() const { return __pn_; } -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 _VSTD::u8string generic_u8string() const { return _VSTD::u8string(__pn_.begin(), __pn_.end()); } #else _VSTD::string generic_u8string() const { return __pn_; } @@ -1520,7 +1520,7 @@ typename enable_if<__is_pathable<_InputIt>::value, path>::type u8path(_InputIt __f, _InputIt __l) { static_assert( -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 is_same::__char_type, char8_t>::value || #endif is_same::__char_type, char>::value, @@ -1544,7 +1544,7 @@ typename enable_if<__is_pathable<_InputIt>::value, path>::type u8path(_InputIt __f, _NullSentinel) { static_assert( -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 is_same::__char_type, char8_t>::value || #endif is_same::__char_type, char>::value, @@ -1567,7 +1567,7 @@ typename enable_if<__is_pathable<_Source>::value, path>::type u8path(const _Source& __s) { static_assert( -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 is_same::__char_type, char8_t>::value || #endif is_same::__char_type, char>::value, diff --git a/libcxx/include/iosfwd b/libcxx/include/iosfwd --- a/libcxx/include/iosfwd +++ b/libcxx/include/iosfwd @@ -107,7 +107,7 @@ template struct _LIBCPP_TEMPLATE_VIS char_traits; template<> struct char_traits; -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 template<> struct char_traits; #endif template<> struct char_traits; @@ -221,7 +221,7 @@ template class _LIBCPP_TEMPLATE_VIS fpos; typedef fpos streampos; typedef fpos wstreampos; -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 typedef fpos u8streampos; #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/include/string b/libcxx/include/string --- a/libcxx/include/string +++ b/libcxx/include/string @@ -668,7 +668,7 @@ #endif // _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 typedef basic_string u8string; #endif @@ -680,7 +680,7 @@ template class _LIBCPP_TEMPLATE_VIS -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 _LIBCPP_PREFERRED_NAME(u8string) #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS @@ -4555,7 +4555,7 @@ return basic_string (__str, __len); } -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 inline _LIBCPP_INLINE_VISIBILITY basic_string operator "" s(const char8_t *__str, size_t __len) _NOEXCEPT { diff --git a/libcxx/include/string_view b/libcxx/include/string_view --- a/libcxx/include/string_view +++ b/libcxx/include/string_view @@ -212,7 +212,7 @@ class _LIBCPP_TEMPLATE_VIS basic_string_view; typedef basic_string_view string_view; -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 typedef basic_string_view u8string_view; #endif typedef basic_string_view u16string_view; @@ -222,7 +222,7 @@ template class _LIBCPP_PREFERRED_NAME(string_view) -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 _LIBCPP_PREFERRED_NAME(u8string_view) #endif _LIBCPP_PREFERRED_NAME(u16string_view) @@ -866,7 +866,7 @@ return basic_string_view (__str, __len); } -#ifndef _LIBCPP_HAS_NO_CHAR8_T +#if _LIBCPP_STD_VER > 17 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR basic_string_view operator "" sv(const char8_t *__str, size_t __len) _NOEXCEPT { diff --git a/libcxx/include/version b/libcxx/include/version --- a/libcxx/include/version +++ b/libcxx/include/version @@ -289,9 +289,7 @@ # define __cpp_lib_bit_cast 201806L // # define __cpp_lib_bitops 201907L # define __cpp_lib_bounded_array_traits 201902L -# if !defined(_LIBCPP_HAS_NO_CHAR8_T) -# define __cpp_lib_char8_t 201811L -# endif +# define __cpp_lib_char8_t 201811L # define __cpp_lib_concepts 202002L # define __cpp_lib_constexpr_algorithms 201806L // # define __cpp_lib_constexpr_complex 201711L diff --git a/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp b/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp --- a/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp +++ b/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp @@ -74,7 +74,7 @@ CHECK_ALWAYS_LOCK_FREE(char); CHECK_ALWAYS_LOCK_FREE(signed char); CHECK_ALWAYS_LOCK_FREE(unsigned char); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 CHECK_ALWAYS_LOCK_FREE(char8_t); #endif CHECK_ALWAYS_LOCK_FREE(char16_t); @@ -125,7 +125,7 @@ static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_CHAR_LOCK_FREE), ""); static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_CHAR_LOCK_FREE), ""); static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_CHAR_LOCK_FREE), ""); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_CHAR8_T_LOCK_FREE), ""); #endif static_assert(std::atomic::is_always_lock_free == (2 == ATOMIC_CHAR16_T_LOCK_FREE), ""); diff --git a/libcxx/test/std/atomics/atomics.lockfree/lockfree.pass.cpp b/libcxx/test/std/atomics/atomics.lockfree/lockfree.pass.cpp --- a/libcxx/test/std/atomics/atomics.lockfree/lockfree.pass.cpp +++ b/libcxx/test/std/atomics/atomics.lockfree/lockfree.pass.cpp @@ -35,7 +35,7 @@ assert(ATOMIC_CHAR_LOCK_FREE == 0 || ATOMIC_CHAR_LOCK_FREE == 1 || ATOMIC_CHAR_LOCK_FREE == 2); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 assert(ATOMIC_CHAR8_T_LOCK_FREE == 0 || ATOMIC_CHAR8_T_LOCK_FREE == 1 || ATOMIC_CHAR8_T_LOCK_FREE == 2); diff --git a/libcxx/test/std/atomics/atomics.types.generic/integral.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/integral.pass.cpp --- a/libcxx/test/std/atomics/atomics.types.generic/integral.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/integral.pass.cpp @@ -176,7 +176,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/atomics/atomics.types.generic/integral_typedefs.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/integral_typedefs.pass.cpp --- a/libcxx/test/std/atomics/atomics.types.generic/integral_typedefs.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/integral_typedefs.pass.cpp @@ -57,7 +57,7 @@ static_assert((std::is_same, std::atomic_llong>::value), ""); static_assert((std::is_same, std::atomic_ullong>::value), ""); static_assert((std::is_same, std::atomic_wchar_t>::value), ""); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 static_assert((std::is_same, std::atomic_char8_t>::value), ""); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/atomics/types.pass.cpp b/libcxx/test/std/atomics/types.pass.cpp --- a/libcxx/test/std/atomics/types.pass.cpp +++ b/libcxx/test/std/atomics/types.pass.cpp @@ -113,7 +113,7 @@ test (); test (); test (); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test (); #endif test (); diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp @@ -126,7 +126,7 @@ int main(int, char**) { for (auto const& MS : PathList) { RunTestCase(MS); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 RunTestCase(MS); #endif RunTestCase(MS); diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/named_overloads.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/named_overloads.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/named_overloads.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/named_overloads.pass.cpp @@ -52,7 +52,7 @@ assert(s == (const char*)MS); } { -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 ASSERT_SAME_TYPE(decltype(p.generic_u8string()), std::u8string); std::u8string s = p.generic_u8string(); assert(s == (const char8_t*)MS); diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/named_overloads.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/named_overloads.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/named_overloads.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/named_overloads.pass.cpp @@ -46,7 +46,7 @@ assert(s == value); } { -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 ASSERT_SAME_TYPE(decltype(p.u8string()), std::u8string); std::u8string s = p.u8string(); assert(s == (const char8_t*)MS); diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp --- a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp +++ b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp @@ -49,8 +49,7 @@ path p = fs::u8path(In3, In3End); assert(p == In1); } -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) && defined(_LIBCPP_VERSION) && \ - !defined(_LIBCPP_HAS_NO_LOCALIZATION) +#if TEST_STD_VER > 17 && defined(_LIBCPP_VERSION) && !defined(_LIBCPP_HAS_NO_LOCALIZATION) const char8_t* u8In1 = u8"abcd/efg"; const std::u8string u8In2(u8In1); const auto u8In3 = u8In2.begin(); diff --git a/libcxx/test/std/language.support/support.limits/limits/is_specialized.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/is_specialized.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/is_specialized.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/is_specialized.pass.cpp @@ -46,7 +46,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp @@ -100,7 +100,7 @@ TEST_NUMERIC_LIMITS(volatile wchar_t) TEST_NUMERIC_LIMITS(const volatile wchar_t) -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 // char8_t TEST_NUMERIC_LIMITS(char8_t) TEST_NUMERIC_LIMITS(const char8_t) diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp @@ -33,7 +33,7 @@ test(0); test(0); test(0); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(0); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp @@ -32,7 +32,7 @@ test(); test(); test::is_signed ? sizeof(wchar_t)*8-1 : sizeof(wchar_t)*8>(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp @@ -36,7 +36,7 @@ test(); test(); test(); // 4 -> 9 and 2 -> 4 -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/epsilon.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/epsilon.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/epsilon.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/epsilon.pass.cpp @@ -33,7 +33,7 @@ test(0); test(0); test(0); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(0); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp @@ -31,7 +31,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp @@ -31,7 +31,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_infinity.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_infinity.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_infinity.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_infinity.pass.cpp @@ -31,7 +31,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_quiet_NaN.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_quiet_NaN.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_quiet_NaN.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_quiet_NaN.pass.cpp @@ -31,7 +31,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_signaling_NaN.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_signaling_NaN.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_signaling_NaN.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_signaling_NaN.pass.cpp @@ -31,7 +31,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp @@ -35,7 +35,7 @@ test(0); test(0); test(0); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(0); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_bounded.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_bounded.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_bounded.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_bounded.pass.cpp @@ -31,7 +31,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp @@ -31,7 +31,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp @@ -31,7 +31,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_integer.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_integer.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_integer.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_integer.pass.cpp @@ -31,7 +31,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp @@ -31,7 +31,7 @@ test(); test(); // test(); // don't know -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_signed.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_signed.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_signed.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/is_signed.pass.cpp @@ -31,7 +31,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/lowest.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/lowest.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/lowest.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/lowest.pass.cpp @@ -39,7 +39,7 @@ test(SCHAR_MIN); test(0); test(WCHAR_MIN); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(0); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max.pass.cpp @@ -39,7 +39,7 @@ test(SCHAR_MAX); test(UCHAR_MAX); test(WCHAR_MAX); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(UCHAR_MAX); // ?? #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_digits10.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_digits10.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_digits10.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_digits10.pass.cpp @@ -32,7 +32,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent.pass.cpp @@ -32,7 +32,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent10.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent10.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent10.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent10.pass.cpp @@ -32,7 +32,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp @@ -39,7 +39,7 @@ test(SCHAR_MIN); test(0); test(WCHAR_MIN); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(0); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent.pass.cpp @@ -32,7 +32,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent10.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent10.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent10.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent10.pass.cpp @@ -32,7 +32,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/quiet_NaN.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/quiet_NaN.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/quiet_NaN.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/quiet_NaN.pass.cpp @@ -52,7 +52,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/radix.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/radix.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/radix.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/radix.pass.cpp @@ -32,7 +32,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/round_error.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/round_error.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/round_error.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/round_error.pass.cpp @@ -33,7 +33,7 @@ test(0); test(0); test(0); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(0); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/round_style.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/round_style.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/round_style.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/round_style.pass.cpp @@ -31,7 +31,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/signaling_NaN.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/signaling_NaN.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/signaling_NaN.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/signaling_NaN.pass.cpp @@ -52,7 +52,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp @@ -31,7 +31,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp --- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp @@ -38,7 +38,7 @@ test(); test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.pass.cpp @@ -261,17 +261,11 @@ # endif # endif -# if defined(__cpp_char8_t) -# ifndef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should be defined in c++20" -# endif -# if __cpp_lib_char8_t != 201811L -# error "__cpp_lib_char8_t should have the value 201811L in c++20" -# endif -# else -# ifdef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should not be defined when defined(__cpp_char8_t) is not defined!" -# endif +# ifndef __cpp_lib_char8_t +# error "__cpp_lib_char8_t should be defined in c++20" +# endif +# if __cpp_lib_char8_t != 201811L +# error "__cpp_lib_char8_t should have the value 201811L in c++20" # endif #elif TEST_STD_VER > 20 @@ -380,17 +374,11 @@ # endif # endif -# if defined(__cpp_char8_t) -# ifndef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should be defined in c++2b" -# endif -# if __cpp_lib_char8_t != 201811L -# error "__cpp_lib_char8_t should have the value 201811L in c++2b" -# endif -# else -# ifdef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should not be defined when defined(__cpp_char8_t) is not defined!" -# endif +# ifndef __cpp_lib_char8_t +# error "__cpp_lib_char8_t should be defined in c++2b" +# endif +# if __cpp_lib_char8_t != 201811L +# error "__cpp_lib_char8_t should have the value 201811L in c++2b" # endif #endif // TEST_STD_VER > 20 diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.pass.cpp @@ -66,17 +66,11 @@ #elif TEST_STD_VER == 20 -# if defined(__cpp_char8_t) -# ifndef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should be defined in c++20" -# endif -# if __cpp_lib_char8_t != 201811L -# error "__cpp_lib_char8_t should have the value 201811L in c++20" -# endif -# else -# ifdef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should not be defined when defined(__cpp_char8_t) is not defined!" -# endif +# ifndef __cpp_lib_char8_t +# error "__cpp_lib_char8_t should be defined in c++20" +# endif +# if __cpp_lib_char8_t != 201811L +# error "__cpp_lib_char8_t should have the value 201811L in c++20" # endif # if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem) @@ -94,17 +88,11 @@ #elif TEST_STD_VER > 20 -# if defined(__cpp_char8_t) -# ifndef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should be defined in c++2b" -# endif -# if __cpp_lib_char8_t != 201811L -# error "__cpp_lib_char8_t should have the value 201811L in c++2b" -# endif -# else -# ifdef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should not be defined when defined(__cpp_char8_t) is not defined!" -# endif +# ifndef __cpp_lib_char8_t +# error "__cpp_lib_char8_t should be defined in c++2b" +# endif +# if __cpp_lib_char8_t != 201811L +# error "__cpp_lib_char8_t should have the value 201811L in c++2b" # endif # if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem) diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/istream.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/istream.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/istream.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/istream.version.pass.cpp @@ -44,32 +44,20 @@ #elif TEST_STD_VER == 20 -# if defined(__cpp_char8_t) -# ifndef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should be defined in c++20" -# endif -# if __cpp_lib_char8_t != 201811L -# error "__cpp_lib_char8_t should have the value 201811L in c++20" -# endif -# else -# ifdef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should not be defined when defined(__cpp_char8_t) is not defined!" -# endif +# ifndef __cpp_lib_char8_t +# error "__cpp_lib_char8_t should be defined in c++20" +# endif +# if __cpp_lib_char8_t != 201811L +# error "__cpp_lib_char8_t should have the value 201811L in c++20" # endif #elif TEST_STD_VER > 20 -# if defined(__cpp_char8_t) -# ifndef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should be defined in c++2b" -# endif -# if __cpp_lib_char8_t != 201811L -# error "__cpp_lib_char8_t should have the value 201811L in c++2b" -# endif -# else -# ifdef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should not be defined when defined(__cpp_char8_t) is not defined!" -# endif +# ifndef __cpp_lib_char8_t +# error "__cpp_lib_char8_t should be defined in c++2b" +# endif +# if __cpp_lib_char8_t != 201811L +# error "__cpp_lib_char8_t should have the value 201811L in c++2b" # endif #endif // TEST_STD_VER > 20 diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/limits.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/limits.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/limits.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/limits.version.pass.cpp @@ -42,32 +42,20 @@ #elif TEST_STD_VER == 20 -# if defined(__cpp_char8_t) -# ifndef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should be defined in c++20" -# endif -# if __cpp_lib_char8_t != 201811L -# error "__cpp_lib_char8_t should have the value 201811L in c++20" -# endif -# else -# ifdef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should not be defined when defined(__cpp_char8_t) is not defined!" -# endif +# ifndef __cpp_lib_char8_t +# error "__cpp_lib_char8_t should be defined in c++20" +# endif +# if __cpp_lib_char8_t != 201811L +# error "__cpp_lib_char8_t should have the value 201811L in c++20" # endif #elif TEST_STD_VER > 20 -# if defined(__cpp_char8_t) -# ifndef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should be defined in c++2b" -# endif -# if __cpp_lib_char8_t != 201811L -# error "__cpp_lib_char8_t should have the value 201811L in c++2b" -# endif -# else -# ifdef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should not be defined when defined(__cpp_char8_t) is not defined!" -# endif +# ifndef __cpp_lib_char8_t +# error "__cpp_lib_char8_t should be defined in c++2b" +# endif +# if __cpp_lib_char8_t != 201811L +# error "__cpp_lib_char8_t should have the value 201811L in c++2b" # endif #endif // TEST_STD_VER > 20 diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/locale.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/locale.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/locale.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/locale.version.pass.cpp @@ -44,32 +44,20 @@ #elif TEST_STD_VER == 20 -# if defined(__cpp_char8_t) -# ifndef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should be defined in c++20" -# endif -# if __cpp_lib_char8_t != 201811L -# error "__cpp_lib_char8_t should have the value 201811L in c++20" -# endif -# else -# ifdef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should not be defined when defined(__cpp_char8_t) is not defined!" -# endif +# ifndef __cpp_lib_char8_t +# error "__cpp_lib_char8_t should be defined in c++20" +# endif +# if __cpp_lib_char8_t != 201811L +# error "__cpp_lib_char8_t should have the value 201811L in c++20" # endif #elif TEST_STD_VER > 20 -# if defined(__cpp_char8_t) -# ifndef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should be defined in c++2b" -# endif -# if __cpp_lib_char8_t != 201811L -# error "__cpp_lib_char8_t should have the value 201811L in c++2b" -# endif -# else -# ifdef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should not be defined when defined(__cpp_char8_t) is not defined!" -# endif +# ifndef __cpp_lib_char8_t +# error "__cpp_lib_char8_t should be defined in c++2b" +# endif +# if __cpp_lib_char8_t != 201811L +# error "__cpp_lib_char8_t should have the value 201811L in c++2b" # endif #endif // TEST_STD_VER > 20 diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/ostream.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/ostream.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/ostream.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/ostream.version.pass.cpp @@ -44,32 +44,20 @@ #elif TEST_STD_VER == 20 -# if defined(__cpp_char8_t) -# ifndef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should be defined in c++20" -# endif -# if __cpp_lib_char8_t != 201811L -# error "__cpp_lib_char8_t should have the value 201811L in c++20" -# endif -# else -# ifdef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should not be defined when defined(__cpp_char8_t) is not defined!" -# endif +# ifndef __cpp_lib_char8_t +# error "__cpp_lib_char8_t should be defined in c++20" +# endif +# if __cpp_lib_char8_t != 201811L +# error "__cpp_lib_char8_t should have the value 201811L in c++20" # endif #elif TEST_STD_VER > 20 -# if defined(__cpp_char8_t) -# ifndef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should be defined in c++2b" -# endif -# if __cpp_lib_char8_t != 201811L -# error "__cpp_lib_char8_t should have the value 201811L in c++2b" -# endif -# else -# ifdef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should not be defined when defined(__cpp_char8_t) is not defined!" -# endif +# ifndef __cpp_lib_char8_t +# error "__cpp_lib_char8_t should be defined in c++2b" +# endif +# if __cpp_lib_char8_t != 201811L +# error "__cpp_lib_char8_t should have the value 201811L in c++2b" # endif #endif // TEST_STD_VER > 20 diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.pass.cpp @@ -169,17 +169,11 @@ # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++20" # endif -# if defined(__cpp_char8_t) -# ifndef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should be defined in c++20" -# endif -# if __cpp_lib_char8_t != 201811L -# error "__cpp_lib_char8_t should have the value 201811L in c++20" -# endif -# else -# ifdef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should not be defined when defined(__cpp_char8_t) is not defined!" -# endif +# ifndef __cpp_lib_char8_t +# error "__cpp_lib_char8_t should be defined in c++20" +# endif +# if __cpp_lib_char8_t != 201811L +# error "__cpp_lib_char8_t should have the value 201811L in c++20" # endif # ifndef __cpp_lib_constexpr_string @@ -237,17 +231,11 @@ # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++2b" # endif -# if defined(__cpp_char8_t) -# ifndef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should be defined in c++2b" -# endif -# if __cpp_lib_char8_t != 201811L -# error "__cpp_lib_char8_t should have the value 201811L in c++2b" -# endif -# else -# ifdef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should not be defined when defined(__cpp_char8_t) is not defined!" -# endif +# ifndef __cpp_lib_char8_t +# error "__cpp_lib_char8_t should be defined in c++2b" +# endif +# if __cpp_lib_char8_t != 201811L +# error "__cpp_lib_char8_t should have the value 201811L in c++2b" # endif # ifndef __cpp_lib_constexpr_string diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/string_view.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/string_view.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/string_view.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/string_view.version.pass.cpp @@ -98,17 +98,11 @@ #elif TEST_STD_VER == 20 -# if defined(__cpp_char8_t) -# ifndef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should be defined in c++20" -# endif -# if __cpp_lib_char8_t != 201811L -# error "__cpp_lib_char8_t should have the value 201811L in c++20" -# endif -# else -# ifdef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should not be defined when defined(__cpp_char8_t) is not defined!" -# endif +# ifndef __cpp_lib_char8_t +# error "__cpp_lib_char8_t should be defined in c++20" +# endif +# if __cpp_lib_char8_t != 201811L +# error "__cpp_lib_char8_t should have the value 201811L in c++20" # endif # ifndef __cpp_lib_constexpr_string_view @@ -138,17 +132,11 @@ #elif TEST_STD_VER > 20 -# if defined(__cpp_char8_t) -# ifndef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should be defined in c++2b" -# endif -# if __cpp_lib_char8_t != 201811L -# error "__cpp_lib_char8_t should have the value 201811L in c++2b" -# endif -# else -# ifdef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should not be defined when defined(__cpp_char8_t) is not defined!" -# endif +# ifndef __cpp_lib_char8_t +# error "__cpp_lib_char8_t should be defined in c++2b" +# endif +# if __cpp_lib_char8_t != 201811L +# error "__cpp_lib_char8_t should have the value 201811L in c++2b" # endif # ifndef __cpp_lib_constexpr_string_view diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp @@ -2318,17 +2318,11 @@ # error "__cpp_lib_byte should have the value 201603L in c++20" # endif -# if defined(__cpp_char8_t) -# ifndef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should be defined in c++20" -# endif -# if __cpp_lib_char8_t != 201811L -# error "__cpp_lib_char8_t should have the value 201811L in c++20" -# endif -# else -# ifdef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should not be defined when defined(__cpp_char8_t) is not defined!" -# endif +# ifndef __cpp_lib_char8_t +# error "__cpp_lib_char8_t should be defined in c++20" +# endif +# if __cpp_lib_char8_t != 201811L +# error "__cpp_lib_char8_t should have the value 201811L in c++20" # endif # ifndef __cpp_lib_chrono @@ -3469,17 +3463,11 @@ # error "__cpp_lib_byte should have the value 201603L in c++2b" # endif -# if defined(__cpp_char8_t) -# ifndef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should be defined in c++2b" -# endif -# if __cpp_lib_char8_t != 201811L -# error "__cpp_lib_char8_t should have the value 201811L in c++2b" -# endif -# else -# ifdef __cpp_lib_char8_t -# error "__cpp_lib_char8_t should not be defined when defined(__cpp_char8_t) is not defined!" -# endif +# ifndef __cpp_lib_char8_t +# error "__cpp_lib_char8_t should be defined in c++2b" +# endif +# if __cpp_lib_char8_t != 201811L +# error "__cpp_lib_char8_t should have the value 201811L in c++2b" # endif # ifndef __cpp_lib_chrono diff --git a/libcxx/test/std/strings/basic.string.hash/char_type_hash.fail.cpp b/libcxx/test/std/strings/basic.string.hash/char_type_hash.fail.cpp --- a/libcxx/test/std/strings/basic.string.hash/char_type_hash.fail.cpp +++ b/libcxx/test/std/strings/basic.string.hash/char_type_hash.fail.cpp @@ -57,7 +57,7 @@ typedef std::basic_string > str_t; std::hash h; // expected-error-re 4 {{{{call to implicitly-deleted default constructor of 'std::hash'|implicit instantiation of undefined template}} {{.+}}}}}} -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 // expected-error-re@-2 {{{{call to implicitly-deleted default constructor of 'std::hash'|implicit instantiation of undefined template}} {{.+}}}}}} #endif (void)h; @@ -66,7 +66,7 @@ int main(int, char**) { test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif test(); diff --git a/libcxx/test/std/strings/string.view/string.view.hash/char_type.hash.fail.cpp b/libcxx/test/std/strings/string.view/string.view.hash/char_type.hash.fail.cpp --- a/libcxx/test/std/strings/string.view/string.view.hash/char_type.hash.fail.cpp +++ b/libcxx/test/std/strings/string.view/string.view.hash/char_type.hash.fail.cpp @@ -57,7 +57,7 @@ typedef std::basic_string_view > strv_t; std::hash h; // expected-error-re 4 {{{{call to implicitly-deleted default constructor of 'std::hash'|implicit instantiation of undefined template}} {{.+}}}}}} -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 // expected-error-re@-2 {{{{call to implicitly-deleted default constructor of 'std::hash'|implicit instantiation of undefined template}} {{.+}}}}}} #endif (void)h; @@ -66,7 +66,7 @@ int main(int, char**) { test(); test(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 test(); #endif test(); diff --git a/libcxx/test/support/atomic_helpers.h b/libcxx/test/support/atomic_helpers.h --- a/libcxx/test/support/atomic_helpers.h +++ b/libcxx/test/support/atomic_helpers.h @@ -78,7 +78,7 @@ TestFunctor()(); TestFunctor()(); TestFunctor()(); -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 TestFunctor()(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/support/make_string.h b/libcxx/test/support/make_string.h --- a/libcxx/test/support/make_string.h +++ b/libcxx/test/support/make_string.h @@ -17,7 +17,7 @@ #include -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 #define CHAR8_ONLY(x) x, #else #define CHAR8_ONLY(x) @@ -33,7 +33,7 @@ struct MultiStringType { const char* s; const wchar_t* w; -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 const char8_t* u8; #endif const char16_t* u16; @@ -41,7 +41,7 @@ constexpr operator const char*() const { return s; } constexpr operator const wchar_t*() const { return w; } -#if TEST_STD_VER > 17 && defined(__cpp_char8_t) +#if TEST_STD_VER > 17 constexpr operator const char8_t*() const { return u8; } #endif constexpr operator const char16_t*() const { return u16; } diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py --- a/libcxx/utils/generate_feature_test_macro_components.py +++ b/libcxx/utils/generate_feature_test_macro_components.py @@ -182,8 +182,6 @@ "name": "__cpp_lib_char8_t", "values": { "c++20": 201811 }, "headers": ["atomic", "filesystem", "istream", "limits", "locale", "ostream", "string", "string_view"], - "test_suite_guard": "defined(__cpp_char8_t)", - "libcxx_guard": "!defined(_LIBCPP_HAS_NO_CHAR8_T)", }, { "name": "__cpp_lib_chrono", "values": { "c++17": 201611 },