{
// ensure that the macros that are supposed to be defined in <atomic> are defined.
-#if TEST_STD_VER > 17
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
# if !defined(__cpp_lib_char8_t)
LIBCPP_STATIC_ASSERT(false, "__cpp_lib_char8_t is not defined");
# else
{
// ensure that the macros that are supposed to be defined in <filesystem> are defined.
-#if TEST_STD_VER > 17
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
# if !defined(__cpp_lib_char8_t)
LIBCPP_STATIC_ASSERT(false, "__cpp_lib_char8_t is not defined");
# else
{
// ensure that the macros that are supposed to be defined in <istream> are defined.
-#if TEST_STD_VER > 17
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
# if !defined(__cpp_lib_char8_t)
LIBCPP_STATIC_ASSERT(false, "__cpp_lib_char8_t is not defined");
# else
{
// ensure that the macros that are supposed to be defined in <limits> are defined.
-#if TEST_STD_VER > 17
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
# if !defined(__cpp_lib_char8_t)
LIBCPP_STATIC_ASSERT(false, "__cpp_lib_char8_t is not defined");
# else
{
// ensure that the macros that are supposed to be defined in <locale> are defined.
-#if TEST_STD_VER > 17
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
# if !defined(__cpp_lib_char8_t)
LIBCPP_STATIC_ASSERT(false, "__cpp_lib_char8_t is not defined");
# else
{
// ensure that the macros that are supposed to be defined in <ostream> are defined.
-#if TEST_STD_VER > 17
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
# if !defined(__cpp_lib_char8_t)
LIBCPP_STATIC_ASSERT(false, "__cpp_lib_char8_t is not defined");
# else
{
// ensure that the macros that are supposed to be defined in <string> are defined.
-#if TEST_STD_VER > 17
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
# if !defined(__cpp_lib_char8_t)
LIBCPP_STATIC_ASSERT(false, "__cpp_lib_char8_t is not defined");
# else
{
// ensure that the macros that are supposed to be defined in <string_view> are defined.
-#if TEST_STD_VER > 17
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
# if !defined(__cpp_lib_char8_t)
LIBCPP_STATIC_ASSERT(false, "__cpp_lib_char8_t is not defined");
# else
# endif
#endif
-#if TEST_STD_VER > 17
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
# if !defined(__cpp_lib_char8_t)
LIBCPP_STATIC_ASSERT(false, "__cpp_lib_char8_t is not defined");
# else
#include "test_macros.h"
+#if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L
constexpr bool test_constexpr()
{
return std::char_traits<char8_t>::compare(u8"123", u8"223", 3) < 0
int main()
{
-#if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L
assert(std::char_traits<char8_t>::compare(u8"", u8"", 0) == 0);
assert(std::char_traits<char8_t>::compare(NULL, NULL, 0) == 0);
assert(std::char_traits<char8_t>::compare(u8"124", u8"123", 3) > 0);
static_assert(test_constexpr(), "" );
-#endif
}
+#else
+int main () {}
+#endif