summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/limits1
-rw-r--r--include/type_traits3
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp10
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/epsilon.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/has_infinity.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/has_quiet_NaN.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/has_signaling_NaN.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/is_bounded.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/is_integer.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/is_signed.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/lowest.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/max.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/max_digits10.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent10.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent10.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/quiet_NaN.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/radix.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/round_error.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/round_style.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/signaling_NaN.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp5
-rw-r--r--test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp5
-rw-r--r--test/std/utilities/meta/meta.unary/meta.unary.cat/is_integral.pass.cpp3
35 files changed, 172 insertions, 0 deletions
diff --git a/include/limits b/include/limits
index f530507f7..5b75f4a9e 100644
--- a/include/limits
+++ b/include/limits
@@ -82,6 +82,7 @@ template<> class numeric_limits<cv char>;
template<> class numeric_limits<cv signed char>;
template<> class numeric_limits<cv unsigned char>;
template<> class numeric_limits<cv wchar_t>;
+template<> class numeric_limits<cv char8_t>; // C++20
template<> class numeric_limits<cv char16_t>;
template<> class numeric_limits<cv char32_t>;
diff --git a/include/type_traits b/include/type_traits
index aadb97ba9..09c001970 100644
--- a/include/type_traits
+++ b/include/type_traits
@@ -709,6 +709,9 @@ template <> struct __libcpp_is_integral<char> : public tr
template <> struct __libcpp_is_integral<signed char> : public true_type {};
template <> struct __libcpp_is_integral<unsigned char> : public true_type {};
template <> struct __libcpp_is_integral<wchar_t> : public true_type {};
+#if _LIBCPP_STD_VER > 17 && defined(__cpp_char8_t)
+template <> struct __libcpp_is_integral<char8_t> : public true_type {};
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
template <> struct __libcpp_is_integral<char16_t> : public true_type {};
template <> struct __libcpp_is_integral<char32_t> : public true_type {};
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp
index 6a46c370e..11772f67d 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp
@@ -9,6 +9,8 @@
#include <limits>
+#include "test_macros.h"
+
/*
<limits>:
numeric_limits
@@ -99,6 +101,14 @@ int main()
TEST_NUMERIC_LIMITS(volatile wchar_t)
TEST_NUMERIC_LIMITS(const volatile wchar_t)
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ // char8_t
+ TEST_NUMERIC_LIMITS(char8_t)
+ TEST_NUMERIC_LIMITS(const char8_t)
+ TEST_NUMERIC_LIMITS(volatile char8_t)
+ TEST_NUMERIC_LIMITS(const volatile char8_t)
+#endif
+
// char16_t
TEST_NUMERIC_LIMITS(char16_t)
TEST_NUMERIC_LIMITS(const char16_t)
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp
index 8deb28d3f..8a3ca008d 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp
@@ -15,6 +15,8 @@
#include <cfloat>
#include <cassert>
+#include "test_macros.h"
+
template <class T>
void
test(T expected)
@@ -32,6 +34,9 @@ int main()
test<signed char>(0);
test<unsigned char>(0);
test<wchar_t>(0);
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t>(0);
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t>(0);
test<char32_t>(0);
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp
index 2dfea084b..7dec03d08 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp
@@ -14,6 +14,8 @@
#include <limits>
#include <cfloat>
+#include "test_macros.h"
+
template <class T, int expected>
void
test()
@@ -31,6 +33,9 @@ int main()
test<signed char, 7>();
test<unsigned char, 8>();
test<wchar_t, std::numeric_limits<wchar_t>::is_signed ? sizeof(wchar_t)*8-1 : sizeof(wchar_t)*8>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, 8>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, 16>();
test<char32_t, 32>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp
index 2c5302cd6..017f8630a 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp
@@ -14,6 +14,8 @@
#include <limits>
#include <cfloat>
+#include "test_macros.h"
+
template <class T, int expected>
void
test()
@@ -35,6 +37,9 @@ int main()
test<signed char, 2>();
test<unsigned char, 2>();
test<wchar_t, 5*sizeof(wchar_t)/2-1>(); // 4 -> 9 and 2 -> 4
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, 2>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, 4>();
test<char32_t, 9>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/epsilon.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/epsilon.pass.cpp
index 0cce48481..b27f5c583 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/epsilon.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/epsilon.pass.cpp
@@ -15,6 +15,8 @@
#include <cfloat>
#include <cassert>
+#include "test_macros.h"
+
template <class T>
void
test(T expected)
@@ -32,6 +34,9 @@ int main()
test<signed char>(0);
test<unsigned char>(0);
test<wchar_t>(0);
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t>(0);
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t>(0);
test<char32_t>(0);
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp
index e61802054..5096ad211 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp
@@ -13,6 +13,8 @@
#include <limits>
+#include "test_macros.h"
+
template <class T, std::float_denorm_style expected>
void
test()
@@ -30,6 +32,9 @@ int main()
test<signed char, std::denorm_absent>();
test<unsigned char, std::denorm_absent>();
test<wchar_t, std::denorm_absent>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, std::denorm_absent>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, std::denorm_absent>();
test<char32_t, std::denorm_absent>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp
index 660ecf503..1b087f0cd 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp
@@ -13,6 +13,8 @@
#include <limits>
+#include "test_macros.h"
+
template <class T, bool expected>
void
test()
@@ -30,6 +32,9 @@ int main()
test<signed char, false>();
test<unsigned char, false>();
test<wchar_t, false>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, false>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, false>();
test<char32_t, false>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/has_infinity.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/has_infinity.pass.cpp
index f8ca2059d..1391f2096 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/has_infinity.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/has_infinity.pass.cpp
@@ -13,6 +13,8 @@
#include <limits>
+#include "test_macros.h"
+
template <class T, bool expected>
void
test()
@@ -30,6 +32,9 @@ int main()
test<signed char, false>();
test<unsigned char, false>();
test<wchar_t, false>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, false>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, false>();
test<char32_t, false>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/has_quiet_NaN.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/has_quiet_NaN.pass.cpp
index 759217169..cb5736f5c 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/has_quiet_NaN.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/has_quiet_NaN.pass.cpp
@@ -13,6 +13,8 @@
#include <limits>
+#include "test_macros.h"
+
template <class T, bool expected>
void
test()
@@ -30,6 +32,9 @@ int main()
test<signed char, false>();
test<unsigned char, false>();
test<wchar_t, false>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, false>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, false>();
test<char32_t, false>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/has_signaling_NaN.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/has_signaling_NaN.pass.cpp
index d68cd5d78..4f43a6532 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/has_signaling_NaN.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/has_signaling_NaN.pass.cpp
@@ -13,6 +13,8 @@
#include <limits>
+#include "test_macros.h"
+
template <class T, bool expected>
void
test()
@@ -30,6 +32,9 @@ int main()
test<signed char, false>();
test<unsigned char, false>();
test<wchar_t, false>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, false>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, false>();
test<char32_t, false>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp
index 033ecdc31..241f9cc27 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp
@@ -15,6 +15,8 @@
#include <cfloat>
#include <cassert>
+#include "test_macros.h"
+
template <class T>
void
test(T expected)
@@ -34,6 +36,9 @@ int main()
test<signed char>(0);
test<unsigned char>(0);
test<wchar_t>(0);
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t>(0);
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t>(0);
test<char32_t>(0);
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/is_bounded.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/is_bounded.pass.cpp
index fa714d5d1..e00afa900 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/is_bounded.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/is_bounded.pass.cpp
@@ -13,6 +13,8 @@
#include <limits>
+#include "test_macros.h"
+
template <class T, bool expected>
void
test()
@@ -30,6 +32,9 @@ int main()
test<signed char, true>();
test<unsigned char, true>();
test<wchar_t, true>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, true>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, true>();
test<char32_t, true>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp
index b96a0e7fc..8431b733f 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp
@@ -13,6 +13,8 @@
#include <limits>
+#include "test_macros.h"
+
template <class T, bool expected>
void
test()
@@ -30,6 +32,9 @@ int main()
test<signed char, true>();
test<unsigned char, true>();
test<wchar_t, true>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, true>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, true>();
test<char32_t, true>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp
index 4408714c1..2e9ac223a 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp
@@ -13,6 +13,8 @@
#include <limits>
+#include "test_macros.h"
+
template <class T, bool expected>
void
test()
@@ -30,6 +32,9 @@ int main()
test<signed char, false>();
test<unsigned char, false>();
test<wchar_t, false>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, false>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, false>();
test<char32_t, false>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/is_integer.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/is_integer.pass.cpp
index 79bc5867e..6e321d1ef 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/is_integer.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/is_integer.pass.cpp
@@ -13,6 +13,8 @@
#include <limits>
+#include "test_macros.h"
+
template <class T, bool expected>
void
test()
@@ -30,6 +32,9 @@ int main()
test<signed char, true>();
test<unsigned char, true>();
test<wchar_t, true>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, true>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, true>();
test<char32_t, true>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp
index 6a609963d..f6412a97d 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp
@@ -13,6 +13,8 @@
#include <limits>
+#include "test_macros.h"
+
template <class T, bool expected>
void
test()
@@ -30,6 +32,9 @@ int main()
test<signed char, false>();
test<unsigned char, true>();
// test<wchar_t, false>(); // don't know
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, true>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, true>();
test<char32_t, true>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/is_signed.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/is_signed.pass.cpp
index 28570fd22..b7a892605 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/is_signed.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/is_signed.pass.cpp
@@ -13,6 +13,8 @@
#include <limits>
+#include "test_macros.h"
+
template <class T, bool expected>
void
test()
@@ -30,6 +32,9 @@ int main()
test<signed char, true>();
test<unsigned char, false>();
test<wchar_t, wchar_t(-1) < wchar_t(0)>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, false>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, false>();
test<char32_t, false>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/lowest.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/lowest.pass.cpp
index 21090aa9c..f505f4142 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/lowest.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/lowest.pass.cpp
@@ -17,6 +17,8 @@
#include <cfloat>
#include <cassert>
+#include "test_macros.h"
+
template <class T>
void
test(T expected)
@@ -38,6 +40,9 @@ int main()
test<signed char>(SCHAR_MIN);
test<unsigned char>(0);
test<wchar_t>(WCHAR_MIN);
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t>(0);
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t>(0);
test<char32_t>(0);
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/max.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/max.pass.cpp
index 7517aaa19..65d5150a7 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/max.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/max.pass.cpp
@@ -17,6 +17,8 @@
#include <cfloat>
#include <cassert>
+#include "test_macros.h"
+
template <class T>
void
test(T expected)
@@ -38,6 +40,9 @@ int main()
test<signed char>(SCHAR_MAX);
test<unsigned char>(UCHAR_MAX);
test<wchar_t>(WCHAR_MAX);
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t>(UCHAR_MAX); // ??
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t>(USHRT_MAX);
test<char32_t>(UINT_MAX);
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/max_digits10.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/max_digits10.pass.cpp
index de771ebe3..158e2791f 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/max_digits10.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/max_digits10.pass.cpp
@@ -14,6 +14,8 @@
#include <limits>
#include <cfloat>
+#include "test_macros.h"
+
template <class T, int expected>
void
test()
@@ -31,6 +33,9 @@ int main()
test<signed char, 0>();
test<unsigned char, 0>();
test<wchar_t, 0>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, 0>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, 0>();
test<char32_t, 0>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent.pass.cpp
index 6b61f7ba4..649310938 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent.pass.cpp
@@ -14,6 +14,8 @@
#include <limits>
#include <cfloat>
+#include "test_macros.h"
+
template <class T, int expected>
void
test()
@@ -31,6 +33,9 @@ int main()
test<signed char, 0>();
test<unsigned char, 0>();
test<wchar_t, 0>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, 0>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, 0>();
test<char32_t, 0>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent10.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent10.pass.cpp
index 927585e94..c4c7a30a7 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent10.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent10.pass.cpp
@@ -14,6 +14,8 @@
#include <limits>
#include <cfloat>
+#include "test_macros.h"
+
template <class T, int expected>
void
test()
@@ -31,6 +33,9 @@ int main()
test<signed char, 0>();
test<unsigned char, 0>();
test<wchar_t, 0>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, 0>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, 0>();
test<char32_t, 0>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp
index e72fbba10..a1e61fcdc 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp
@@ -17,6 +17,8 @@
#include <cfloat>
#include <cassert>
+#include "test_macros.h"
+
template <class T>
void
test(T expected)
@@ -38,6 +40,9 @@ int main()
test<signed char>(SCHAR_MIN);
test<unsigned char>(0);
test<wchar_t>(WCHAR_MIN);
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t>(0);
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t>(0);
test<char32_t>(0);
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent.pass.cpp
index 245e84414..930d01102 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent.pass.cpp
@@ -14,6 +14,8 @@
#include <limits>
#include <cfloat>
+#include "test_macros.h"
+
template <class T, int expected>
void
test()
@@ -31,6 +33,9 @@ int main()
test<signed char, 0>();
test<unsigned char, 0>();
test<wchar_t, 0>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, 0>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, 0>();
test<char32_t, 0>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent10.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent10.pass.cpp
index b54d46fd5..05891b1f6 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent10.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent10.pass.cpp
@@ -14,6 +14,8 @@
#include <limits>
#include <cfloat>
+#include "test_macros.h"
+
template <class T, int expected>
void
test()
@@ -31,6 +33,9 @@ int main()
test<signed char, 0>();
test<unsigned char, 0>();
test<wchar_t, 0>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, 0>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, 0>();
test<char32_t, 0>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/quiet_NaN.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/quiet_NaN.pass.cpp
index 97166f0c3..5d5597c47 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/quiet_NaN.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/quiet_NaN.pass.cpp
@@ -16,6 +16,8 @@
#include <type_traits>
#include <cassert>
+#include "test_macros.h"
+
template <class T>
void
test_imp(std::true_type)
@@ -51,6 +53,9 @@ int main()
test<signed char>();
test<unsigned char>();
test<wchar_t>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t>();
test<char32_t>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/radix.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/radix.pass.cpp
index 98a2a53d1..1514ae841 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/radix.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/radix.pass.cpp
@@ -14,6 +14,8 @@
#include <limits>
#include <cfloat>
+#include "test_macros.h"
+
template <class T, int expected>
void
test()
@@ -31,6 +33,9 @@ int main()
test<signed char, 2>();
test<unsigned char, 2>();
test<wchar_t, 2>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, 2>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, 2>();
test<char32_t, 2>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/round_error.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/round_error.pass.cpp
index 5da5c9513..3c2dc5493 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/round_error.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/round_error.pass.cpp
@@ -15,6 +15,8 @@
#include <cfloat>
#include <cassert>
+#include "test_macros.h"
+
template <class T>
void
test(T expected)
@@ -32,6 +34,9 @@ int main()
test<signed char>(0);
test<unsigned char>(0);
test<wchar_t>(0);
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t>(0);
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t>(0);
test<char32_t>(0);
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/round_style.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/round_style.pass.cpp
index 645f6f7df..f1fd20035 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/round_style.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/round_style.pass.cpp
@@ -13,6 +13,8 @@
#include <limits>
+#include "test_macros.h"
+
template <class T, std::float_round_style expected>
void
test()
@@ -30,6 +32,9 @@ int main()
test<signed char, std::round_toward_zero>();
test<unsigned char, std::round_toward_zero>();
test<wchar_t, std::round_toward_zero>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, std::round_toward_zero>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, std::round_toward_zero>();
test<char32_t, std::round_toward_zero>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/signaling_NaN.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/signaling_NaN.pass.cpp
index d9df999dd..a0a6d7f84 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/signaling_NaN.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/signaling_NaN.pass.cpp
@@ -16,6 +16,8 @@
#include <type_traits>
#include <cassert>
+#include "test_macros.h"
+
template <class T>
void
test_imp(std::true_type)
@@ -51,6 +53,9 @@ int main()
test<signed char>();
test<unsigned char>();
test<wchar_t>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t>();
test<char32_t>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp
index 9e2a8431a..901eea4d0 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp
@@ -13,6 +13,8 @@
#include <limits>
+#include "test_macros.h"
+
template <class T, bool expected>
void
test()
@@ -30,6 +32,9 @@ int main()
test<signed char, false>();
test<unsigned char, false>();
test<wchar_t, false>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, false>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, false>();
test<char32_t, false>();
diff --git a/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp b/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp
index 23811fada..8e407c225 100644
--- a/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp
+++ b/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp
@@ -13,6 +13,8 @@
#include <limits>
+#include "test_macros.h"
+
#if defined(__i386__) || defined(__x86_64__) || defined(__pnacl__) || \
defined(__wasm__)
static const bool integral_types_trap = true;
@@ -37,6 +39,9 @@ int main()
test<signed char, integral_types_trap>();
test<unsigned char, integral_types_trap>();
test<wchar_t, integral_types_trap>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test<char8_t, integral_types_trap>();
+#endif
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
test<char16_t, integral_types_trap>();
test<char32_t, integral_types_trap>();
diff --git a/test/std/utilities/meta/meta.unary/meta.unary.cat/is_integral.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.cat/is_integral.pass.cpp
index 09997626e..fa81b11b7 100644
--- a/test/std/utilities/meta/meta.unary/meta.unary.cat/is_integral.pass.cpp
+++ b/test/std/utilities/meta/meta.unary/meta.unary.cat/is_integral.pass.cpp
@@ -85,6 +85,9 @@ int main()
test_is_integral<signed char>();
test_is_integral<unsigned char>();
test_is_integral<wchar_t>();
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t)
+ test_is_integral<char8_t>();
+#endif
test_is_not_integral<std::nullptr_t>();
test_is_not_integral<void>();