Index: include/__config =================================================================== --- include/__config +++ include/__config @@ -485,49 +485,53 @@ typedef unsigned int char32_t; #endif // _LIBCPP_HAS_NO_UNICODE_CHARS +#ifndef __SIZEOF_INT128__ +#define _LIBCPP_HAS_NO_INT128 +#endif + #ifdef _LIBCPP_HAS_NO_STATIC_ASSERT template struct __static_assert_test; template <> struct __static_assert_test {}; template struct __static_assert_check {}; #define static_assert(__b, __m) \ typedef __static_assert_check)> \ _LIBCPP_CONCAT(__t, __LINE__) #endif // _LIBCPP_HAS_NO_STATIC_ASSERT #ifdef _LIBCPP_HAS_NO_DECLTYPE #define decltype(x) __typeof__(x) #endif #ifdef _LIBCPP_HAS_NO_CONSTEXPR #define _LIBCPP_CONSTEXPR #else #define _LIBCPP_CONSTEXPR constexpr #endif #ifdef _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS #define _LIBCPP_DEFAULT {} #else #define _LIBCPP_DEFAULT = default; #endif #ifdef __GNUC__ #define _NOALIAS __attribute__((__malloc__)) #else #define _NOALIAS #endif #ifndef __has_feature #define __has_feature(__x) 0 #endif #if __has_feature(cxx_explicit_conversions) || defined(__IBMCPP__) # define _LIBCPP_EXPLICIT explicit #else # define _LIBCPP_EXPLICIT #endif #ifdef _LIBCPP_HAS_NO_STRONG_ENUMS #define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_TYPE_VIS x { enum __lx #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \ Index: include/type_traits =================================================================== --- include/type_traits +++ include/type_traits @@ -325,106 +325,110 @@ template <> struct __libcpp_is_integral : public true_type {}; template <> struct __libcpp_is_integral : public true_type {}; template <> struct __libcpp_is_integral : public true_type {}; +#ifndef _LIBCPP_HAS_NO_INT128 +template <> struct __libcpp_is_integral<__int128_t> : public true_type {}; +template <> struct __libcpp_is_integral<__uint128_t> : public true_type {}; +#endif template struct _LIBCPP_TYPE_VIS_ONLY is_integral : public __libcpp_is_integral::type> {}; // is_floating_point template struct __libcpp_is_floating_point : public false_type {}; template <> struct __libcpp_is_floating_point : public true_type {}; template <> struct __libcpp_is_floating_point : public true_type {}; template <> struct __libcpp_is_floating_point : public true_type {}; template struct _LIBCPP_TYPE_VIS_ONLY is_floating_point : public __libcpp_is_floating_point::type> {}; // is_array template struct _LIBCPP_TYPE_VIS_ONLY is_array : public false_type {}; template struct _LIBCPP_TYPE_VIS_ONLY is_array<_Tp[]> : public true_type {}; template struct _LIBCPP_TYPE_VIS_ONLY is_array<_Tp[_Np]> : public true_type {}; // is_pointer template struct __libcpp_is_pointer : public false_type {}; template struct __libcpp_is_pointer<_Tp*> : public true_type {}; template struct _LIBCPP_TYPE_VIS_ONLY is_pointer : public __libcpp_is_pointer::type> {}; // is_reference template struct _LIBCPP_TYPE_VIS_ONLY is_lvalue_reference : public false_type {}; template struct _LIBCPP_TYPE_VIS_ONLY is_lvalue_reference<_Tp&> : public true_type {}; template struct _LIBCPP_TYPE_VIS_ONLY is_rvalue_reference : public false_type {}; #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template struct _LIBCPP_TYPE_VIS_ONLY is_rvalue_reference<_Tp&&> : public true_type {}; #endif template struct _LIBCPP_TYPE_VIS_ONLY is_reference : public false_type {}; template struct _LIBCPP_TYPE_VIS_ONLY is_reference<_Tp&> : public true_type {}; #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template struct _LIBCPP_TYPE_VIS_ONLY is_reference<_Tp&&> : public true_type {}; #endif #if defined(__clang__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) #define _LIBCPP_HAS_TYPE_TRAITS #endif // is_union #if __has_feature(is_union) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) template struct _LIBCPP_TYPE_VIS_ONLY is_union : public integral_constant {}; #else template struct __libcpp_union : public false_type {}; template struct _LIBCPP_TYPE_VIS_ONLY is_union : public __libcpp_union::type> {}; #endif // is_class #if __has_feature(is_class) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) template struct _LIBCPP_TYPE_VIS_ONLY is_class : public integral_constant {}; #else namespace __is_class_imp { template char __test(int _Tp::*); template __two __test(...); } template struct _LIBCPP_TYPE_VIS_ONLY is_class : public integral_constant(0)) == 1 && !is_union<_Tp>::value> {}; #endif // is_same template struct _LIBCPP_TYPE_VIS_ONLY is_same : public false_type {}; template struct _LIBCPP_TYPE_VIS_ONLY is_same<_Tp, _Tp> : public true_type {}; // is_function namespace __libcpp_is_function_imp { template char __test(_Tp*); template __two __test(...); template _Tp& __source(); } template ::value || is_union<_Tp>::value || is_void<_Tp>::value || @@ -1247,90 +1251,98 @@ __type_list +#else __nat +#endif > > > > > __signed_types; typedef __type_list +#else __nat +#endif > > > > > __unsigned_types; template struct __find_first; template struct __find_first<__type_list<_Hp, _Tp>, _Size, true> { typedef _Hp type; }; template struct __find_first<__type_list<_Hp, _Tp>, _Size, false> { typedef typename __find_first<_Tp, _Size>::type type; }; template ::type>::value, bool = is_volatile::type>::value> struct __apply_cv { typedef _Up type; }; template struct __apply_cv<_Tp, _Up, true, false> { typedef const _Up type; }; template struct __apply_cv<_Tp, _Up, false, true> { typedef volatile _Up type; }; template struct __apply_cv<_Tp, _Up, true, true> { typedef const volatile _Up type; }; template struct __apply_cv<_Tp&, _Up, false, false> { typedef _Up& type; }; template struct __apply_cv<_Tp&, _Up, true, false> { typedef const _Up& type; }; template struct __apply_cv<_Tp&, _Up, false, true> { typedef volatile _Up& type; }; template struct __apply_cv<_Tp&, _Up, true, true> { typedef const volatile _Up& type; }; template ::value || is_enum<_Tp>::value> struct __make_signed {}; template struct __make_signed<_Tp, true> { typedef typename __find_first<__signed_types, sizeof(_Tp)>::type type; }; template <> struct __make_signed {}; template <> struct __make_signed< signed short, true> {typedef short type;}; template <> struct __make_signed {typedef short type;}; @@ -1340,26 +1352,30 @@ template <> struct __make_signed {typedef long type;}; template <> struct __make_signed< signed long long, true> {typedef long long type;}; template <> struct __make_signed {typedef long long type;}; +#ifndef _LIBCPP_HAS_NO_INT128 +template <> struct __make_signed<__int128_t, true> {typedef __int128_t type;}; +template <> struct __make_signed<__uint128_t, true> {typedef __int128_t type;}; +#endif template struct _LIBCPP_TYPE_VIS_ONLY make_signed { typedef typename __apply_cv<_Tp, typename __make_signed::type>::type>::type type; }; #if _LIBCPP_STD_VER > 11 template using make_signed_t = typename make_signed<_Tp>::type; #endif template ::value || is_enum<_Tp>::value> struct __make_unsigned {}; template struct __make_unsigned<_Tp, true> { typedef typename __find_first<__unsigned_types, sizeof(_Tp)>::type type; }; template <> struct __make_unsigned {}; template <> struct __make_unsigned< signed short, true> {typedef unsigned short type;}; template <> struct __make_unsigned {typedef unsigned short type;}; @@ -1369,33 +1385,37 @@ template <> struct __make_unsigned {typedef unsigned long type;}; template <> struct __make_unsigned< signed long long, true> {typedef unsigned long long type;}; template <> struct __make_unsigned {typedef unsigned long long type;}; +#ifndef _LIBCPP_HAS_NO_INT128 +template <> struct __make_unsigned<__int128_t, true> {typedef __uint128_t type;}; +template <> struct __make_unsigned<__uint128_t, true> {typedef __uint128_t type;}; +#endif template struct _LIBCPP_TYPE_VIS_ONLY make_unsigned { typedef typename __apply_cv<_Tp, typename __make_unsigned::type>::type>::type type; }; #if _LIBCPP_STD_VER > 11 template using make_unsigned_t = typename make_unsigned<_Tp>::type; #endif #ifdef _LIBCPP_HAS_NO_VARIADICS template struct _LIBCPP_TYPE_VIS_ONLY common_type { public: typedef typename common_type::type, V>::type type; }; template struct _LIBCPP_TYPE_VIS_ONLY common_type<_Tp, void, void> { public: typedef typename decay<_Tp>::type type; }; template struct _LIBCPP_TYPE_VIS_ONLY common_type<_Tp, _Up, void> { Index: test/language.support/support.limits/limits/is_specialized.pass.cpp =================================================================== --- test/language.support/support.limits/limits/is_specialized.pass.cpp +++ test/language.support/support.limits/limits/is_specialized.pass.cpp @@ -59,6 +59,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t>(); + test<__uint128_t>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp @@ -129,54 +129,68 @@ TEST_NUMERIC_LIMITS(volatile long) TEST_NUMERIC_LIMITS(const volatile long) +#ifndef _LIBCPP_HAS_NO_INT128 + TEST_NUMERIC_LIMITS(__int128_t) + TEST_NUMERIC_LIMITS(const __int128_t) + TEST_NUMERIC_LIMITS(volatile __int128_t) + TEST_NUMERIC_LIMITS(const volatile __int128_t) +#endif + // long long TEST_NUMERIC_LIMITS(long long) TEST_NUMERIC_LIMITS(const long long) TEST_NUMERIC_LIMITS(volatile long long) TEST_NUMERIC_LIMITS(const volatile long long) // unsigned short TEST_NUMERIC_LIMITS(unsigned short) TEST_NUMERIC_LIMITS(const unsigned short) TEST_NUMERIC_LIMITS(volatile unsigned short) TEST_NUMERIC_LIMITS(const volatile unsigned short) // unsigned int TEST_NUMERIC_LIMITS(unsigned int) TEST_NUMERIC_LIMITS(const unsigned int) TEST_NUMERIC_LIMITS(volatile unsigned int) TEST_NUMERIC_LIMITS(const volatile unsigned int) // unsigned long TEST_NUMERIC_LIMITS(unsigned long) TEST_NUMERIC_LIMITS(const unsigned long) TEST_NUMERIC_LIMITS(volatile unsigned long) TEST_NUMERIC_LIMITS(const volatile unsigned long) // unsigned long long TEST_NUMERIC_LIMITS(unsigned long long) TEST_NUMERIC_LIMITS(const unsigned long long) TEST_NUMERIC_LIMITS(volatile unsigned long long) TEST_NUMERIC_LIMITS(const volatile unsigned long long) +#ifndef _LIBCPP_HAS_NO_INT128 + TEST_NUMERIC_LIMITS(__uint128_t) + TEST_NUMERIC_LIMITS(const __uint128_t) + TEST_NUMERIC_LIMITS(volatile __uint128_t) + TEST_NUMERIC_LIMITS(const volatile __uint128_t) +#endif + // float TEST_NUMERIC_LIMITS(float) TEST_NUMERIC_LIMITS(const float) TEST_NUMERIC_LIMITS(volatile float) TEST_NUMERIC_LIMITS(const volatile float) - + // double TEST_NUMERIC_LIMITS(double) TEST_NUMERIC_LIMITS(const double) TEST_NUMERIC_LIMITS(volatile double) TEST_NUMERIC_LIMITS(const volatile double) - + // long double TEST_NUMERIC_LIMITS(long double) TEST_NUMERIC_LIMITS(const long double) TEST_NUMERIC_LIMITS(volatile long double) TEST_NUMERIC_LIMITS(const volatile long double) // other TEST_NUMERIC_LIMITS(other) TEST_NUMERIC_LIMITS(const other) Index: test/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp @@ -43,6 +43,10 @@ test(0); test(0); test(0); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t>(0); + test<__uint128_t>(0); +#endif test(__FLT_DENORM_MIN__); test(__DBL_DENORM_MIN__); test(__LDBL_DENORM_MIN__); Index: test/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp @@ -43,6 +43,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, 127>(); + test<__uint128_t, 128>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp @@ -47,6 +47,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, 38>(); + test<__uint128_t, 38>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/epsilon.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/epsilon.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/epsilon.pass.cpp @@ -44,6 +44,10 @@ test(0); test(0); test(0); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t>(0); + test<__uint128_t>(0); +#endif test(FLT_EPSILON); test(DBL_EPSILON); test(LDBL_EPSILON); Index: test/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp @@ -42,6 +42,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, std::denorm_absent>(); + test<__uint128_t, std::denorm_absent>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp @@ -42,6 +42,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, false>(); + test<__uint128_t, false>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/has_infinity.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/has_infinity.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/has_infinity.pass.cpp @@ -42,6 +42,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, false>(); + test<__uint128_t, false>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/has_quiet_NaN.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/has_quiet_NaN.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/has_quiet_NaN.pass.cpp @@ -42,6 +42,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, false>(); + test<__uint128_t, false>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/has_signaling_NaN.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/has_signaling_NaN.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/has_signaling_NaN.pass.cpp @@ -42,6 +42,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, false>(); + test<__uint128_t, false>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp @@ -46,9 +46,13 @@ test(0); test(0); test(0); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t>(0); + test<__uint128_t>(0); +#endif test(1./zero); test(1./zero); test(1./zero); } float zero = 0; Index: test/language.support/support.limits/limits/numeric.limits.members/is_bounded.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/is_bounded.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/is_bounded.pass.cpp @@ -42,6 +42,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, true>(); + test<__uint128_t, true>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp @@ -42,6 +42,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, true>(); + test<__uint128_t, true>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp @@ -42,6 +42,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, false>(); + test<__uint128_t, false>(); +#endif test(); test(); #if (defined(__ppc__) || defined(__ppc64__)) Index: test/language.support/support.limits/limits/numeric.limits.members/is_integer.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/is_integer.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/is_integer.pass.cpp @@ -42,6 +42,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, true>(); + test<__uint128_t, true>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp @@ -42,6 +42,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, true>(); + test<__uint128_t, true>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/is_signed.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/is_signed.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/is_signed.pass.cpp @@ -42,6 +42,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, true>(); + test<__uint128_t, false>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/lowest.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/lowest.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/lowest.pass.cpp @@ -50,6 +50,10 @@ test(0); test(LLONG_MIN); test(0); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t>(-__int128_t(__uint128_t(-1)/2) - 1); + test<__uint128_t>(0); +#endif test(-FLT_MAX); test(-DBL_MAX); test(-LDBL_MAX); Index: test/language.support/support.limits/limits/numeric.limits.members/max.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/max.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/max.pass.cpp @@ -50,6 +50,10 @@ test(ULONG_MAX); test(LLONG_MAX); test(ULLONG_MAX); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t>(__int128_t(__uint128_t(-1)/2)); + test<__uint128_t>(__uint128_t(-1)); +#endif test(FLT_MAX); test(DBL_MAX); test(LDBL_MAX); Index: test/language.support/support.limits/limits/numeric.limits.members/max_digits10.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/max_digits10.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/max_digits10.pass.cpp @@ -43,6 +43,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, 0>(); + test<__uint128_t, 0>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/max_exponent.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/max_exponent.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/max_exponent.pass.cpp @@ -43,6 +43,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, 0>(); + test<__uint128_t, 0>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/max_exponent10.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/max_exponent10.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/max_exponent10.pass.cpp @@ -43,6 +43,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, 0>(); + test<__uint128_t, 0>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp @@ -50,6 +50,10 @@ test(0); test(LLONG_MIN); test(0); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t>(-__int128_t(__uint128_t(-1)/2) - 1); + test<__uint128_t>(0); +#endif test(FLT_MIN); test(DBL_MIN); test(LDBL_MIN); Index: test/language.support/support.limits/limits/numeric.limits.members/min_exponent.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/min_exponent.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/min_exponent.pass.cpp @@ -43,6 +43,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, 0>(); + test<__uint128_t, 0>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/min_exponent10.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/min_exponent10.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/min_exponent10.pass.cpp @@ -43,6 +43,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, 0>(); + test<__uint128_t, 0>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/quiet_NaN.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/quiet_NaN.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/quiet_NaN.pass.cpp @@ -63,6 +63,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t>(); + test<__uint128_t>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/radix.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/radix.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/radix.pass.cpp @@ -43,6 +43,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, 2>(); + test<__uint128_t, 2>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/round_error.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/round_error.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/round_error.pass.cpp @@ -44,6 +44,10 @@ test(0); test(0); test(0); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t>(0); + test<__uint128_t>(0); +#endif test(0.5); test(0.5); test(0.5); Index: test/language.support/support.limits/limits/numeric.limits.members/round_style.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/round_style.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/round_style.pass.cpp @@ -42,6 +42,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, std::round_toward_zero>(); + test<__uint128_t, std::round_toward_zero>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/signaling_NaN.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/signaling_NaN.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/signaling_NaN.pass.cpp @@ -63,6 +63,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t>(); + test<__uint128_t>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp @@ -42,6 +42,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, false>(); + test<__uint128_t, false>(); +#endif test(); test(); test(); Index: test/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp =================================================================== --- test/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp +++ test/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp @@ -48,6 +48,10 @@ test(); test(); test(); +#ifndef _LIBCPP_HAS_NO_INT128 + test<__int128_t, integral_types_trap>(); + test<__uint128_t, integral_types_trap>(); +#endif test(); test(); test(); Index: test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp =================================================================== --- test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp +++ test/utilities/meta/meta.trans/meta.trans.sign/make_signed.pass.cpp @@ -21,6 +21,13 @@ big = 0xFFFFFFFFFFFFFFFFULL }; +#if !defined(_LIBCPP_HAS_NO_INT128) && !defined(_LIBCPP_HAS_NO_STRONG_ENUMS) +enum HugeEnum : __uint128_t +{ + hugezero +}; +#endif + template void test_make_signed() { @@ -47,4 +54,11 @@ test_make_signed< const wchar_t, std::conditional::type >(); test_make_signed< const Enum, const int >(); test_make_signed< BigEnum, std::conditional::type >(); +#ifndef _LIBCPP_HAS_NO_INT128 + test_make_signed< __int128_t, __int128_t >(); + test_make_signed< __uint128_t, __int128_t >(); +# ifndef _LIBCPP_HAS_NO_STRONG_ENUMS + test_make_signed< HugeEnum, __int128_t >(); +# endif +#endif } Index: test/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp =================================================================== --- test/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp +++ test/utilities/meta/meta.trans/meta.trans.sign/make_unsigned.pass.cpp @@ -21,6 +21,13 @@ big = 0xFFFFFFFFFFFFFFFFULL }; +#if !defined(_LIBCPP_HAS_NO_INT128) && !defined(_LIBCPP_HAS_NO_STRONG_ENUMS) +enum HugeEnum : __int128_t +{ + hugezero +}; +#endif + template void test_make_unsigned() { @@ -48,4 +55,11 @@ test_make_unsigned (); test_make_unsigned::type> (); +#ifndef _LIBCPP_HAS_NO_INT128 + test_make_unsigned<__int128_t, __uint128_t>(); + test_make_unsigned<__uint128_t, __uint128_t>(); +# ifndef _LIBCPP_HAS_NO_STRONG_ENUMS + test_make_unsigned(); +# endif +#endif } Index: test/utilities/meta/meta.unary/meta.unary.cat/integral.pass.cpp =================================================================== --- test/utilities/meta/meta.unary/meta.unary.cat/integral.pass.cpp +++ test/utilities/meta/meta.unary/meta.unary.cat/integral.pass.cpp @@ -58,4 +58,8 @@ test_integral(); test_integral(); test_integral(); +#ifndef _LIBCPP_HAS_NO_INT128 + test_integral<__int128_t>(); + test_integral<__uint128_t>(); +#endif } Index: test/utilities/meta/meta.unary/meta.unary.comp/integral.pass.cpp =================================================================== --- test/utilities/meta/meta.unary/meta.unary.comp/integral.pass.cpp +++ test/utilities/meta/meta.unary/meta.unary.comp/integral.pass.cpp @@ -49,4 +49,8 @@ test_integral(); test_integral(); test_integral(); +#ifndef _LIBCPP_HAS_NO_INT128 + test_integral<__int128_t>(); + test_integral<__uint128_t>(); +#endif } Index: test/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp =================================================================== --- test/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp +++ test/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp @@ -51,4 +51,9 @@ test_is_signed(); test_is_signed(); + +#ifndef _LIBCPP_HAS_NO_INT128 + test_is_signed<__int128_t>(); + test_is_not_signed<__uint128_t>(); +#endif } Index: test/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp =================================================================== --- test/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp +++ test/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp @@ -51,4 +51,9 @@ test_is_unsigned(); test_is_unsigned(); + +#ifndef _LIBCPP_HAS_NO_INT128 + test_is_unsigned<__uint128_t>(); + test_is_not_unsigned<__int128_t>(); +#endif }