+#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_INT128)
+ /// numeric_limits<__int128_t> specialization.
+ template<>
+ struct numeric_limits<__int128_t>
+ {
+ static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
+
+ static _GLIBCXX_CONSTEXPR __int128_t
+ min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min (__int128_t); }
+
+ static _GLIBCXX_CONSTEXPR __int128_t
+ max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max (__int128_t); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ static constexpr __int128_t
+ lowest() noexcept { return min(); }
+#endif
+
+ static _GLIBCXX_USE_CONSTEXPR int digits
+ = __glibcxx_digits (__int128_t);
+ static _GLIBCXX_USE_CONSTEXPR int digits10
+ = __glibcxx_digits10 (__int128_t);
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ static constexpr int max_digits10 = 0;
+#endif
+ static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
+ static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
+ static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
+ static _GLIBCXX_USE_CONSTEXPR int radix = 2;
+
+ static _GLIBCXX_CONSTEXPR __int128_t
+ epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
+
+ static _GLIBCXX_CONSTEXPR __int128_t
+ round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
+
+ static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
+ static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
+ static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
+ static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
+
+ static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
+ static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
+ static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
+ static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
+ = denorm_absent;
+ static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
+
+ static _GLIBCXX_CONSTEXPR __int128_t
+ infinity() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<__int128_t>(0); }
+
+ static _GLIBCXX_CONSTEXPR __int128_t
+ quiet_NaN() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<__int128_t>(0); }
+
+ static _GLIBCXX_CONSTEXPR __int128_t
+ signaling_NaN() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<__int128_t>(0); }
+
+ static _GLIBCXX_CONSTEXPR __int128_t
+ denorm_min() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<__int128_t>(0); }
+
+ static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
+ static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
+ static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
+
+ static _GLIBCXX_USE_CONSTEXPR bool traps
+ = __glibcxx_integral_traps;
+ static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
+ static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
+ = round_toward_zero;
+ };
+
+ /// numeric_limits<__uint128_t> specialization.
+ template<>
+ struct numeric_limits<__uint128_t>
+ {
+ static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
+
+ static _GLIBCXX_CONSTEXPR __uint128_t
+ min() _GLIBCXX_USE_NOEXCEPT { return 0; }
+
+ static _GLIBCXX_CONSTEXPR __uint128_t
+ max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max (__uint128_t); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ static constexpr __uint128_t
+ lowest() noexcept { return min(); }
+#endif
+
+ static _GLIBCXX_USE_CONSTEXPR int digits
+ = __glibcxx_digits (__uint128_t);
+ static _GLIBCXX_USE_CONSTEXPR int digits10
+ = __glibcxx_digits10 (__uint128_t);
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ static constexpr int max_digits10 = 0;
+#endif
+ static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
+ static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
+ static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
+ static _GLIBCXX_USE_CONSTEXPR int radix = 2;
+
+ static _GLIBCXX_CONSTEXPR __uint128_t
+ epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
+
+ static _GLIBCXX_CONSTEXPR __uint128_t
+ round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
+
+ static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
+ static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
+ static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
+ static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
+
+ static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
+ static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
+ static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
+ static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
+ = denorm_absent;
+ static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
+
+ static _GLIBCXX_CONSTEXPR __uint128_t
+ infinity() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<__uint128_t>(0); }
+
+ static _GLIBCXX_CONSTEXPR __uint128_t
+ quiet_NaN() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<__uint128_t>(0); }
+
+ static _GLIBCXX_CONSTEXPR __uint128_t
+ signaling_NaN() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<__uint128_t>(0); }
+
+ static _GLIBCXX_CONSTEXPR __uint128_t
+ denorm_min() _GLIBCXX_USE_NOEXCEPT
+ { return static_cast<__uint128_t>(0); }
+
+ static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
+ static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
+ static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
+
+ static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
+ static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
+ static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
+ = round_toward_zero;
+ };
+#endif
+