Import a new version of libc++ into the vendor branch.
This commit is contained in:
parent
acbeab898d
commit
43cd761579
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/vendor/libc++/dist/; revision=234959 svn path=/vendor/libc++/r156067/; revision=234960; tag=vendor/libc++/r156067
@ -384,7 +384,9 @@ template <unsigned> struct __static_assert_check {};
|
||||
#endif
|
||||
|
||||
#ifdef _LIBCPP_HAS_NO_CONSTEXPR
|
||||
#define constexpr const
|
||||
#define _LIBCPP_CONSTEXPR
|
||||
#else
|
||||
#define _LIBCPP_CONSTEXPR constexpr
|
||||
#endif
|
||||
|
||||
#ifndef __has_feature
|
||||
|
@ -216,7 +216,7 @@ struct __tuple_convertible_imp : public false_type {};
|
||||
template <class _Tp0, class ..._Tp, class _Up0, class ..._Up>
|
||||
struct __tuple_convertible_imp<true, __tuple_types<_Tp0, _Tp...>, __tuple_types<_Up0, _Up...> >
|
||||
: public integral_constant<bool,
|
||||
is_constructible<_Up0, _Tp0>::value &&
|
||||
is_convertible<_Tp0, _Up0>::value &&
|
||||
__tuple_convertible_imp<true, __tuple_types<_Tp...>, __tuple_types<_Up...> >::value> {};
|
||||
|
||||
template <>
|
||||
@ -235,6 +235,33 @@ struct __tuple_convertible<_Tp, _Up, true, true>
|
||||
typename __make_tuple_types<_Tp>::type, typename __make_tuple_types<_Up>::type>
|
||||
{};
|
||||
|
||||
// __tuple_constructible
|
||||
|
||||
template <bool, class _Tp, class _Up>
|
||||
struct __tuple_constructible_imp : public false_type {};
|
||||
|
||||
template <class _Tp0, class ..._Tp, class _Up0, class ..._Up>
|
||||
struct __tuple_constructible_imp<true, __tuple_types<_Tp0, _Tp...>, __tuple_types<_Up0, _Up...> >
|
||||
: public integral_constant<bool,
|
||||
is_constructible<_Up0, _Tp0>::value &&
|
||||
__tuple_constructible_imp<true, __tuple_types<_Tp...>, __tuple_types<_Up...> >::value> {};
|
||||
|
||||
template <>
|
||||
struct __tuple_constructible_imp<true, __tuple_types<>, __tuple_types<> >
|
||||
: public true_type {};
|
||||
|
||||
template <class _Tp, class _Up, bool = __tuple_like<typename remove_reference<_Tp>::type>::value,
|
||||
bool = __tuple_like<_Up>::value>
|
||||
struct __tuple_constructible
|
||||
: public false_type {};
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
struct __tuple_constructible<_Tp, _Up, true, true>
|
||||
: public __tuple_constructible_imp<tuple_size<typename remove_reference<_Tp>::type>::value ==
|
||||
tuple_size<_Up>::value,
|
||||
typename __make_tuple_types<_Tp>::type, typename __make_tuple_types<_Up>::type>
|
||||
{};
|
||||
|
||||
// __tuple_assignable
|
||||
|
||||
template <bool, class _Tp, class _Up>
|
||||
|
@ -2508,11 +2508,16 @@ private:
|
||||
_Engine_result_type __mask0_;
|
||||
_Engine_result_type __mask1_;
|
||||
|
||||
#ifdef _LIBCPP_HAS_NO_CONSTEXPR
|
||||
static const _Working_result_type _Rp = _Engine::_Max - _Engine::_Min
|
||||
+ _Working_result_type(1);
|
||||
static const size_t __m = __log2<_Working_result_type, _Rp>::value;
|
||||
static const size_t _WDt = numeric_limits<_Working_result_type>::digits;
|
||||
static const size_t _EDt = numeric_limits<_Engine_result_type>::digits;
|
||||
+ _Working_result_type(1);
|
||||
#else
|
||||
static _LIBCPP_CONSTEXPR const _Working_result_type _Rp = _Engine::max() - _Engine::min()
|
||||
+ _Working_result_type(1);
|
||||
#endif
|
||||
static _LIBCPP_CONSTEXPR const size_t __m = __log2<_Working_result_type, _Rp>::value;
|
||||
static _LIBCPP_CONSTEXPR const size_t _WDt = numeric_limits<_Working_result_type>::digits;
|
||||
static _LIBCPP_CONSTEXPR const size_t _EDt = numeric_limits<_Engine_result_type>::digits;
|
||||
|
||||
public:
|
||||
// constructors and seeding functions
|
||||
@ -2712,8 +2717,8 @@ public:
|
||||
|
||||
result_type operator()();
|
||||
|
||||
static constexpr result_type min() {return _Min;}
|
||||
static constexpr result_type max() {return _Max;}
|
||||
static _LIBCPP_CONSTEXPR result_type min() {return _Min;}
|
||||
static _LIBCPP_CONSTEXPR result_type max() {return _Max;}
|
||||
|
||||
friend __rs_default __rs_get();
|
||||
};
|
||||
|
718
include/atomic
718
include/atomic
File diff suppressed because it is too large
Load Diff
@ -648,10 +648,17 @@ using ::double_t;
|
||||
|
||||
// abs
|
||||
|
||||
template <class _A1>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if<is_floating_point<_A1>::value, _A1>::type
|
||||
abs(_A1 __x) {return fabs(__x);}
|
||||
float
|
||||
abs(float __x) {return fabsf(__x);}
|
||||
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
double
|
||||
abs(double __x) {return fabs(__x);}
|
||||
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
long double
|
||||
abs(long double __x) {return fabsl(__x);}
|
||||
|
||||
#ifndef __sun__
|
||||
|
||||
|
720
include/limits
720
include/limits
@ -21,43 +21,43 @@ template<class T>
|
||||
class numeric_limits
|
||||
{
|
||||
public:
|
||||
static const bool is_specialized = false;
|
||||
static T min() noexcept;
|
||||
static T max() noexcept;
|
||||
static T lowest() noexcept;
|
||||
static constexpr bool is_specialized = false;
|
||||
static constexpr T min() noexcept;
|
||||
static constexpr T max() noexcept;
|
||||
static constexpr T lowest() noexcept;
|
||||
|
||||
static const int digits = 0;
|
||||
static const int digits10 = 0;
|
||||
static const int max_digits10 = 0;
|
||||
static const bool is_signed = false;
|
||||
static const bool is_integer = false;
|
||||
static const bool is_exact = false;
|
||||
static const int radix = 0;
|
||||
static T epsilon() noexcept;
|
||||
static T round_error() noexcept;
|
||||
static constexpr int digits = 0;
|
||||
static constexpr int digits10 = 0;
|
||||
static constexpr int max_digits10 = 0;
|
||||
static constexpr bool is_signed = false;
|
||||
static constexpr bool is_integer = false;
|
||||
static constexpr bool is_exact = false;
|
||||
static constexpr int radix = 0;
|
||||
static constexpr T epsilon() noexcept;
|
||||
static constexpr T round_error() noexcept;
|
||||
|
||||
static const int min_exponent = 0;
|
||||
static const int min_exponent10 = 0;
|
||||
static const int max_exponent = 0;
|
||||
static const int max_exponent10 = 0;
|
||||
static constexpr int min_exponent = 0;
|
||||
static constexpr int min_exponent10 = 0;
|
||||
static constexpr int max_exponent = 0;
|
||||
static constexpr int max_exponent10 = 0;
|
||||
|
||||
static const bool has_infinity = false;
|
||||
static const bool has_quiet_NaN = false;
|
||||
static const bool has_signaling_NaN = false;
|
||||
static const float_denorm_style has_denorm = denorm_absent;
|
||||
static const bool has_denorm_loss = false;
|
||||
static T infinity() noexcept;
|
||||
static T quiet_NaN() noexcept;
|
||||
static T signaling_NaN() noexcept;
|
||||
static T denorm_min() noexcept;
|
||||
static constexpr bool has_infinity = false;
|
||||
static constexpr bool has_quiet_NaN = false;
|
||||
static constexpr bool has_signaling_NaN = false;
|
||||
static constexpr float_denorm_style has_denorm = denorm_absent;
|
||||
static constexpr bool has_denorm_loss = false;
|
||||
static constexpr T infinity() noexcept;
|
||||
static constexpr T quiet_NaN() noexcept;
|
||||
static constexpr T signaling_NaN() noexcept;
|
||||
static constexpr T denorm_min() noexcept;
|
||||
|
||||
static const bool is_iec559 = false;
|
||||
static const bool is_bounded = false;
|
||||
static const bool is_modulo = false;
|
||||
static constexpr bool is_iec559 = false;
|
||||
static constexpr bool is_bounded = false;
|
||||
static constexpr bool is_modulo = false;
|
||||
|
||||
static const bool traps = false;
|
||||
static const bool tinyness_before = false;
|
||||
static const float_round_style round_style = round_toward_zero;
|
||||
static constexpr bool traps = false;
|
||||
static constexpr bool tinyness_before = false;
|
||||
static constexpr float_round_style round_style = round_toward_zero;
|
||||
};
|
||||
|
||||
enum float_round_style
|
||||
@ -139,55 +139,55 @@ class __libcpp_numeric_limits
|
||||
protected:
|
||||
typedef _Tp type;
|
||||
|
||||
static const bool is_specialized = false;
|
||||
_LIBCPP_INLINE_VISIBILITY static type min() _NOEXCEPT {return type();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type max() _NOEXCEPT {return type();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type lowest() _NOEXCEPT {return type();}
|
||||
static _LIBCPP_CONSTEXPR const bool is_specialized = false;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return type();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return type();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return type();}
|
||||
|
||||
static const int digits = 0;
|
||||
static const int digits10 = 0;
|
||||
static const int max_digits10 = 0;
|
||||
static const bool is_signed = false;
|
||||
static const bool is_integer = false;
|
||||
static const bool is_exact = false;
|
||||
static const int radix = 0;
|
||||
_LIBCPP_INLINE_VISIBILITY static type epsilon() _NOEXCEPT {return type();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type round_error() _NOEXCEPT {return type();}
|
||||
static _LIBCPP_CONSTEXPR const int digits = 0;
|
||||
static _LIBCPP_CONSTEXPR const int digits10 = 0;
|
||||
static _LIBCPP_CONSTEXPR const int max_digits10 = 0;
|
||||
static _LIBCPP_CONSTEXPR const bool is_signed = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_integer = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_exact = false;
|
||||
static _LIBCPP_CONSTEXPR const int radix = 0;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type();}
|
||||
|
||||
static const int min_exponent = 0;
|
||||
static const int min_exponent10 = 0;
|
||||
static const int max_exponent = 0;
|
||||
static const int max_exponent10 = 0;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent = 0;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent10 = 0;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent = 0;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent10 = 0;
|
||||
|
||||
static const bool has_infinity = false;
|
||||
static const bool has_quiet_NaN = false;
|
||||
static const bool has_signaling_NaN = false;
|
||||
static const float_denorm_style has_denorm = denorm_absent;
|
||||
static const bool has_denorm_loss = false;
|
||||
_LIBCPP_INLINE_VISIBILITY static type infinity() _NOEXCEPT {return type();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type quiet_NaN() _NOEXCEPT {return type();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type signaling_NaN() _NOEXCEPT {return type();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type denorm_min() _NOEXCEPT {return type();}
|
||||
static _LIBCPP_CONSTEXPR const bool has_infinity = false;
|
||||
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
|
||||
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
|
||||
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
|
||||
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type();}
|
||||
|
||||
static const bool is_iec559 = false;
|
||||
static const bool is_bounded = false;
|
||||
static const bool is_modulo = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_bounded = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_modulo = false;
|
||||
|
||||
static const bool traps = false;
|
||||
static const bool tinyness_before = false;
|
||||
static const float_round_style round_style = round_toward_zero;
|
||||
static _LIBCPP_CONSTEXPR const bool traps = false;
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
|
||||
};
|
||||
|
||||
template <class _Tp, int digits, bool is_signed>
|
||||
struct __libcpp_compute_min
|
||||
{
|
||||
static const _Tp value = _Tp(_Tp(1) << digits);
|
||||
static _LIBCPP_CONSTEXPR const _Tp value = _Tp(_Tp(1) << digits);
|
||||
};
|
||||
|
||||
template <class _Tp, int digits>
|
||||
struct __libcpp_compute_min<_Tp, digits, false>
|
||||
{
|
||||
static const _Tp value = _Tp(0);
|
||||
static _LIBCPP_CONSTEXPR const _Tp value = _Tp(0);
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
@ -196,50 +196,50 @@ class __libcpp_numeric_limits<_Tp, true>
|
||||
protected:
|
||||
typedef _Tp type;
|
||||
|
||||
static const bool is_specialized = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_specialized = true;
|
||||
|
||||
static const bool is_signed = type(-1) < type(0);
|
||||
static const int digits = static_cast<int>(sizeof(type) * __CHAR_BIT__ - is_signed);
|
||||
static const int digits10 = digits * 3 / 10;
|
||||
static const int max_digits10 = 0;
|
||||
static const type __min = __libcpp_compute_min<type, digits, is_signed>::value;
|
||||
static const type __max = is_signed ? type(type(~0) ^ __min) : type(~0);
|
||||
_LIBCPP_INLINE_VISIBILITY static type min() _NOEXCEPT {return __min;}
|
||||
_LIBCPP_INLINE_VISIBILITY static type max() _NOEXCEPT {return __max;}
|
||||
_LIBCPP_INLINE_VISIBILITY static type lowest() _NOEXCEPT {return min();}
|
||||
static _LIBCPP_CONSTEXPR const bool is_signed = type(-1) < type(0);
|
||||
static _LIBCPP_CONSTEXPR const int digits = static_cast<int>(sizeof(type) * __CHAR_BIT__ - is_signed);
|
||||
static _LIBCPP_CONSTEXPR const int digits10 = digits * 3 / 10;
|
||||
static _LIBCPP_CONSTEXPR const int max_digits10 = 0;
|
||||
static _LIBCPP_CONSTEXPR const type __min = __libcpp_compute_min<type, digits, is_signed>::value;
|
||||
static _LIBCPP_CONSTEXPR const type __max = is_signed ? type(type(~0) ^ __min) : type(~0);
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __min;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __max;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return min();}
|
||||
|
||||
static const bool is_integer = true;
|
||||
static const bool is_exact = true;
|
||||
static const int radix = 2;
|
||||
_LIBCPP_INLINE_VISIBILITY static type epsilon() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static type round_error() _NOEXCEPT {return type(0);}
|
||||
static _LIBCPP_CONSTEXPR const bool is_integer = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_exact = true;
|
||||
static _LIBCPP_CONSTEXPR const int radix = 2;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type(0);}
|
||||
|
||||
static const int min_exponent = 0;
|
||||
static const int min_exponent10 = 0;
|
||||
static const int max_exponent = 0;
|
||||
static const int max_exponent10 = 0;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent = 0;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent10 = 0;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent = 0;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent10 = 0;
|
||||
|
||||
static const bool has_infinity = false;
|
||||
static const bool has_quiet_NaN = false;
|
||||
static const bool has_signaling_NaN = false;
|
||||
static const float_denorm_style has_denorm = denorm_absent;
|
||||
static const bool has_denorm_loss = false;
|
||||
_LIBCPP_INLINE_VISIBILITY static type infinity() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static type quiet_NaN() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static type signaling_NaN() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static type denorm_min() _NOEXCEPT {return type(0);}
|
||||
static _LIBCPP_CONSTEXPR const bool has_infinity = false;
|
||||
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
|
||||
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
|
||||
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
|
||||
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type(0);}
|
||||
|
||||
static const bool is_iec559 = false;
|
||||
static const bool is_bounded = true;
|
||||
static const bool is_modulo = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_bounded = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_modulo = true;
|
||||
|
||||
#if __i386__ || __x86_64__
|
||||
static const bool traps = true;
|
||||
static _LIBCPP_CONSTEXPR const bool traps = true;
|
||||
#else
|
||||
static const bool traps = false;
|
||||
static _LIBCPP_CONSTEXPR const bool traps = false;
|
||||
#endif
|
||||
static const bool tinyness_before = false;
|
||||
static const float_round_style round_style = round_toward_zero;
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
|
||||
};
|
||||
|
||||
template <>
|
||||
@ -248,46 +248,46 @@ class __libcpp_numeric_limits<bool, true>
|
||||
protected:
|
||||
typedef bool type;
|
||||
|
||||
static const bool is_specialized = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_specialized = true;
|
||||
|
||||
static const bool is_signed = false;
|
||||
static const int digits = 1;
|
||||
static const int digits10 = 0;
|
||||
static const int max_digits10 = 0;
|
||||
static const type __min = false;
|
||||
static const type __max = true;
|
||||
_LIBCPP_INLINE_VISIBILITY static type min() _NOEXCEPT {return __min;}
|
||||
_LIBCPP_INLINE_VISIBILITY static type max() _NOEXCEPT {return __max;}
|
||||
_LIBCPP_INLINE_VISIBILITY static type lowest() _NOEXCEPT {return min();}
|
||||
static _LIBCPP_CONSTEXPR const bool is_signed = false;
|
||||
static _LIBCPP_CONSTEXPR const int digits = 1;
|
||||
static _LIBCPP_CONSTEXPR const int digits10 = 0;
|
||||
static _LIBCPP_CONSTEXPR const int max_digits10 = 0;
|
||||
static _LIBCPP_CONSTEXPR const type __min = false;
|
||||
static _LIBCPP_CONSTEXPR const type __max = true;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __min;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __max;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return min();}
|
||||
|
||||
static const bool is_integer = true;
|
||||
static const bool is_exact = true;
|
||||
static const int radix = 2;
|
||||
_LIBCPP_INLINE_VISIBILITY static type epsilon() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static type round_error() _NOEXCEPT {return type(0);}
|
||||
static _LIBCPP_CONSTEXPR const bool is_integer = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_exact = true;
|
||||
static _LIBCPP_CONSTEXPR const int radix = 2;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type(0);}
|
||||
|
||||
static const int min_exponent = 0;
|
||||
static const int min_exponent10 = 0;
|
||||
static const int max_exponent = 0;
|
||||
static const int max_exponent10 = 0;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent = 0;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent10 = 0;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent = 0;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent10 = 0;
|
||||
|
||||
static const bool has_infinity = false;
|
||||
static const bool has_quiet_NaN = false;
|
||||
static const bool has_signaling_NaN = false;
|
||||
static const float_denorm_style has_denorm = denorm_absent;
|
||||
static const bool has_denorm_loss = false;
|
||||
_LIBCPP_INLINE_VISIBILITY static type infinity() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static type quiet_NaN() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static type signaling_NaN() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static type denorm_min() _NOEXCEPT {return type(0);}
|
||||
static _LIBCPP_CONSTEXPR const bool has_infinity = false;
|
||||
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
|
||||
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
|
||||
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
|
||||
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type(0);}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type(0);}
|
||||
|
||||
static const bool is_iec559 = false;
|
||||
static const bool is_bounded = true;
|
||||
static const bool is_modulo = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_bounded = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_modulo = false;
|
||||
|
||||
static const bool traps = false;
|
||||
static const bool tinyness_before = false;
|
||||
static const float_round_style round_style = round_toward_zero;
|
||||
static _LIBCPP_CONSTEXPR const bool traps = false;
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
|
||||
};
|
||||
|
||||
template <>
|
||||
@ -296,44 +296,44 @@ class __libcpp_numeric_limits<float, true>
|
||||
protected:
|
||||
typedef float type;
|
||||
|
||||
static const bool is_specialized = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_specialized = true;
|
||||
|
||||
static const bool is_signed = true;
|
||||
static const int digits = __FLT_MANT_DIG__;
|
||||
static const int digits10 = __FLT_DIG__;
|
||||
static const int max_digits10 = 2+(digits * 30103)/100000;
|
||||
_LIBCPP_INLINE_VISIBILITY static type min() _NOEXCEPT {return __FLT_MIN__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static type max() _NOEXCEPT {return __FLT_MAX__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static type lowest() _NOEXCEPT {return -max();}
|
||||
static _LIBCPP_CONSTEXPR const bool is_signed = true;
|
||||
static _LIBCPP_CONSTEXPR const int digits = __FLT_MANT_DIG__;
|
||||
static _LIBCPP_CONSTEXPR const int digits10 = __FLT_DIG__;
|
||||
static _LIBCPP_CONSTEXPR const int max_digits10 = 2+(digits * 30103)/100000;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __FLT_MIN__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __FLT_MAX__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return -max();}
|
||||
|
||||
static const bool is_integer = false;
|
||||
static const bool is_exact = false;
|
||||
static const int radix = __FLT_RADIX__;
|
||||
_LIBCPP_INLINE_VISIBILITY static type epsilon() _NOEXCEPT {return __FLT_EPSILON__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static type round_error() _NOEXCEPT {return 0.5F;}
|
||||
static _LIBCPP_CONSTEXPR const bool is_integer = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_exact = false;
|
||||
static _LIBCPP_CONSTEXPR const int radix = __FLT_RADIX__;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __FLT_EPSILON__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return 0.5F;}
|
||||
|
||||
static const int min_exponent = __FLT_MIN_EXP__;
|
||||
static const int min_exponent10 = __FLT_MIN_10_EXP__;
|
||||
static const int max_exponent = __FLT_MAX_EXP__;
|
||||
static const int max_exponent10 = __FLT_MAX_10_EXP__;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent = __FLT_MIN_EXP__;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent10 = __FLT_MIN_10_EXP__;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent = __FLT_MAX_EXP__;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent10 = __FLT_MAX_10_EXP__;
|
||||
|
||||
static const bool has_infinity = true;
|
||||
static const bool has_quiet_NaN = true;
|
||||
static const bool has_signaling_NaN = true;
|
||||
static const float_denorm_style has_denorm = denorm_present;
|
||||
static const bool has_denorm_loss = false;
|
||||
_LIBCPP_INLINE_VISIBILITY static type infinity() _NOEXCEPT {return __builtin_huge_valf();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type quiet_NaN() _NOEXCEPT {return __builtin_nanf("");}
|
||||
_LIBCPP_INLINE_VISIBILITY static type signaling_NaN() _NOEXCEPT {return __builtin_nansf("");}
|
||||
_LIBCPP_INLINE_VISIBILITY static type denorm_min() _NOEXCEPT {return __FLT_DENORM_MIN__;}
|
||||
static _LIBCPP_CONSTEXPR const bool has_infinity = true;
|
||||
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
|
||||
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
|
||||
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
|
||||
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_valf();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nanf("");}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansf("");}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __FLT_DENORM_MIN__;}
|
||||
|
||||
static const bool is_iec559 = true;
|
||||
static const bool is_bounded = true;
|
||||
static const bool is_modulo = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_bounded = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_modulo = false;
|
||||
|
||||
static const bool traps = false;
|
||||
static const bool tinyness_before = false;
|
||||
static const float_round_style round_style = round_to_nearest;
|
||||
static _LIBCPP_CONSTEXPR const bool traps = false;
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
|
||||
};
|
||||
|
||||
template <>
|
||||
@ -342,44 +342,44 @@ class __libcpp_numeric_limits<double, true>
|
||||
protected:
|
||||
typedef double type;
|
||||
|
||||
static const bool is_specialized = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_specialized = true;
|
||||
|
||||
static const bool is_signed = true;
|
||||
static const int digits = __DBL_MANT_DIG__;
|
||||
static const int digits10 = __DBL_DIG__;
|
||||
static const int max_digits10 = 2+(digits * 30103)/100000;
|
||||
_LIBCPP_INLINE_VISIBILITY static type min() _NOEXCEPT {return __DBL_MIN__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static type max() _NOEXCEPT {return __DBL_MAX__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static type lowest() _NOEXCEPT {return -max();}
|
||||
static _LIBCPP_CONSTEXPR const bool is_signed = true;
|
||||
static _LIBCPP_CONSTEXPR const int digits = __DBL_MANT_DIG__;
|
||||
static _LIBCPP_CONSTEXPR const int digits10 = __DBL_DIG__;
|
||||
static _LIBCPP_CONSTEXPR const int max_digits10 = 2+(digits * 30103)/100000;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __DBL_MIN__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __DBL_MAX__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return -max();}
|
||||
|
||||
static const bool is_integer = false;
|
||||
static const bool is_exact = false;
|
||||
static const int radix = __FLT_RADIX__;
|
||||
_LIBCPP_INLINE_VISIBILITY static type epsilon() _NOEXCEPT {return __DBL_EPSILON__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static type round_error() _NOEXCEPT {return 0.5;}
|
||||
static _LIBCPP_CONSTEXPR const bool is_integer = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_exact = false;
|
||||
static _LIBCPP_CONSTEXPR const int radix = __FLT_RADIX__;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __DBL_EPSILON__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return 0.5;}
|
||||
|
||||
static const int min_exponent = __DBL_MIN_EXP__;
|
||||
static const int min_exponent10 = __DBL_MIN_10_EXP__;
|
||||
static const int max_exponent = __DBL_MAX_EXP__;
|
||||
static const int max_exponent10 = __DBL_MAX_10_EXP__;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent = __DBL_MIN_EXP__;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent10 = __DBL_MIN_10_EXP__;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent = __DBL_MAX_EXP__;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent10 = __DBL_MAX_10_EXP__;
|
||||
|
||||
static const bool has_infinity = true;
|
||||
static const bool has_quiet_NaN = true;
|
||||
static const bool has_signaling_NaN = true;
|
||||
static const float_denorm_style has_denorm = denorm_present;
|
||||
static const bool has_denorm_loss = false;
|
||||
_LIBCPP_INLINE_VISIBILITY static type infinity() _NOEXCEPT {return __builtin_huge_val();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type quiet_NaN() _NOEXCEPT {return __builtin_nan("");}
|
||||
_LIBCPP_INLINE_VISIBILITY static type signaling_NaN() _NOEXCEPT {return __builtin_nans("");}
|
||||
_LIBCPP_INLINE_VISIBILITY static type denorm_min() _NOEXCEPT {return __DBL_DENORM_MIN__;}
|
||||
static _LIBCPP_CONSTEXPR const bool has_infinity = true;
|
||||
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
|
||||
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
|
||||
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
|
||||
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_val();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nan("");}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nans("");}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __DBL_DENORM_MIN__;}
|
||||
|
||||
static const bool is_iec559 = true;
|
||||
static const bool is_bounded = true;
|
||||
static const bool is_modulo = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_bounded = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_modulo = false;
|
||||
|
||||
static const bool traps = false;
|
||||
static const bool tinyness_before = false;
|
||||
static const float_round_style round_style = round_to_nearest;
|
||||
static _LIBCPP_CONSTEXPR const bool traps = false;
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
|
||||
};
|
||||
|
||||
template <>
|
||||
@ -388,48 +388,48 @@ class __libcpp_numeric_limits<long double, true>
|
||||
protected:
|
||||
typedef long double type;
|
||||
|
||||
static const bool is_specialized = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_specialized = true;
|
||||
|
||||
static const bool is_signed = true;
|
||||
static const int digits = __LDBL_MANT_DIG__;
|
||||
static const int digits10 = __LDBL_DIG__;
|
||||
static const int max_digits10 = 2+(digits * 30103)/100000;
|
||||
_LIBCPP_INLINE_VISIBILITY static type min() _NOEXCEPT {return __LDBL_MIN__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static type max() _NOEXCEPT {return __LDBL_MAX__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static type lowest() _NOEXCEPT {return -max();}
|
||||
static _LIBCPP_CONSTEXPR const bool is_signed = true;
|
||||
static _LIBCPP_CONSTEXPR const int digits = __LDBL_MANT_DIG__;
|
||||
static _LIBCPP_CONSTEXPR const int digits10 = __LDBL_DIG__;
|
||||
static _LIBCPP_CONSTEXPR const int max_digits10 = 2+(digits * 30103)/100000;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __LDBL_MIN__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __LDBL_MAX__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return -max();}
|
||||
|
||||
static const bool is_integer = false;
|
||||
static const bool is_exact = false;
|
||||
static const int radix = __FLT_RADIX__;
|
||||
_LIBCPP_INLINE_VISIBILITY static type epsilon() _NOEXCEPT {return __LDBL_EPSILON__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static type round_error() _NOEXCEPT {return 0.5;}
|
||||
static _LIBCPP_CONSTEXPR const bool is_integer = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_exact = false;
|
||||
static _LIBCPP_CONSTEXPR const int radix = __FLT_RADIX__;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __LDBL_EPSILON__;}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return 0.5;}
|
||||
|
||||
static const int min_exponent = __LDBL_MIN_EXP__;
|
||||
static const int min_exponent10 = __LDBL_MIN_10_EXP__;
|
||||
static const int max_exponent = __LDBL_MAX_EXP__;
|
||||
static const int max_exponent10 = __LDBL_MAX_10_EXP__;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent = __LDBL_MIN_EXP__;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent10 = __LDBL_MIN_10_EXP__;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent = __LDBL_MAX_EXP__;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent10 = __LDBL_MAX_10_EXP__;
|
||||
|
||||
static const bool has_infinity = true;
|
||||
static const bool has_quiet_NaN = true;
|
||||
static const bool has_signaling_NaN = true;
|
||||
static const float_denorm_style has_denorm = denorm_present;
|
||||
static const bool has_denorm_loss = false;
|
||||
_LIBCPP_INLINE_VISIBILITY static type infinity() _NOEXCEPT {return __builtin_huge_vall();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type quiet_NaN() _NOEXCEPT {return __builtin_nanl("");}
|
||||
_LIBCPP_INLINE_VISIBILITY static type signaling_NaN() _NOEXCEPT {return __builtin_nansl("");}
|
||||
_LIBCPP_INLINE_VISIBILITY static type denorm_min() _NOEXCEPT {return __LDBL_DENORM_MIN__;}
|
||||
static _LIBCPP_CONSTEXPR const bool has_infinity = true;
|
||||
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
|
||||
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
|
||||
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
|
||||
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_vall();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nanl("");}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansl("");}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __LDBL_DENORM_MIN__;}
|
||||
|
||||
#if (defined(__ppc__) || defined(__ppc64__))
|
||||
static const bool is_iec559 = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
|
||||
#else
|
||||
static const bool is_iec559 = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
|
||||
#endif
|
||||
static const bool is_bounded = true;
|
||||
static const bool is_modulo = false;
|
||||
static _LIBCPP_CONSTEXPR const bool is_bounded = true;
|
||||
static _LIBCPP_CONSTEXPR const bool is_modulo = false;
|
||||
|
||||
static const bool traps = false;
|
||||
static const bool tinyness_before = false;
|
||||
static const float_round_style round_style = round_to_nearest;
|
||||
static _LIBCPP_CONSTEXPR const bool traps = false;
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
@ -439,43 +439,43 @@ class _LIBCPP_VISIBLE numeric_limits
|
||||
typedef __libcpp_numeric_limits<typename remove_cv<_Tp>::type> __base;
|
||||
typedef typename __base::type type;
|
||||
public:
|
||||
static const bool is_specialized = __base::is_specialized;
|
||||
_LIBCPP_INLINE_VISIBILITY static type min() _NOEXCEPT {return __base::min();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type max() _NOEXCEPT {return __base::max();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type lowest() _NOEXCEPT {return __base::lowest();}
|
||||
static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}
|
||||
|
||||
static const int digits = __base::digits;
|
||||
static const int digits10 = __base::digits10;
|
||||
static const int max_digits10 = __base::max_digits10;
|
||||
static const bool is_signed = __base::is_signed;
|
||||
static const bool is_integer = __base::is_integer;
|
||||
static const bool is_exact = __base::is_exact;
|
||||
static const int radix = __base::radix;
|
||||
_LIBCPP_INLINE_VISIBILITY static type epsilon() _NOEXCEPT {return __base::epsilon();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type round_error() _NOEXCEPT {return __base::round_error();}
|
||||
static _LIBCPP_CONSTEXPR const int digits = __base::digits;
|
||||
static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10;
|
||||
static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10;
|
||||
static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
|
||||
static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
|
||||
static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
|
||||
static _LIBCPP_CONSTEXPR const int radix = __base::radix;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}
|
||||
|
||||
static const int min_exponent = __base::min_exponent;
|
||||
static const int min_exponent10 = __base::min_exponent10;
|
||||
static const int max_exponent = __base::max_exponent;
|
||||
static const int max_exponent10 = __base::max_exponent10;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10;
|
||||
|
||||
static const bool has_infinity = __base::has_infinity;
|
||||
static const bool has_quiet_NaN = __base::has_quiet_NaN;
|
||||
static const bool has_signaling_NaN = __base::has_signaling_NaN;
|
||||
static const float_denorm_style has_denorm = __base::has_denorm;
|
||||
static const bool has_denorm_loss = __base::has_denorm_loss;
|
||||
_LIBCPP_INLINE_VISIBILITY static type infinity() _NOEXCEPT {return __base::infinity();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type denorm_min() _NOEXCEPT {return __base::denorm_min();}
|
||||
static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
|
||||
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
|
||||
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
|
||||
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
|
||||
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}
|
||||
|
||||
static const bool is_iec559 = __base::is_iec559;
|
||||
static const bool is_bounded = __base::is_bounded;
|
||||
static const bool is_modulo = __base::is_modulo;
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
|
||||
static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
|
||||
static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;
|
||||
|
||||
static const bool traps = __base::traps;
|
||||
static const bool tinyness_before = __base::tinyness_before;
|
||||
static const float_round_style round_style = __base::round_style;
|
||||
static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
@ -485,43 +485,43 @@ class _LIBCPP_VISIBLE numeric_limits<const _Tp>
|
||||
typedef numeric_limits<_Tp> __base;
|
||||
typedef _Tp type;
|
||||
public:
|
||||
static const bool is_specialized = __base::is_specialized;
|
||||
_LIBCPP_INLINE_VISIBILITY static type min() _NOEXCEPT {return __base::min();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type max() _NOEXCEPT {return __base::max();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type lowest() _NOEXCEPT {return __base::lowest();}
|
||||
static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}
|
||||
|
||||
static const int digits = __base::digits;
|
||||
static const int digits10 = __base::digits10;
|
||||
static const int max_digits10 = __base::max_digits10;
|
||||
static const bool is_signed = __base::is_signed;
|
||||
static const bool is_integer = __base::is_integer;
|
||||
static const bool is_exact = __base::is_exact;
|
||||
static const int radix = __base::radix;
|
||||
_LIBCPP_INLINE_VISIBILITY static type epsilon() _NOEXCEPT {return __base::epsilon();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type round_error() _NOEXCEPT {return __base::round_error();}
|
||||
static _LIBCPP_CONSTEXPR const int digits = __base::digits;
|
||||
static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10;
|
||||
static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10;
|
||||
static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
|
||||
static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
|
||||
static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
|
||||
static _LIBCPP_CONSTEXPR const int radix = __base::radix;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}
|
||||
|
||||
static const int min_exponent = __base::min_exponent;
|
||||
static const int min_exponent10 = __base::min_exponent10;
|
||||
static const int max_exponent = __base::max_exponent;
|
||||
static const int max_exponent10 = __base::max_exponent10;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10;
|
||||
|
||||
static const bool has_infinity = __base::has_infinity;
|
||||
static const bool has_quiet_NaN = __base::has_quiet_NaN;
|
||||
static const bool has_signaling_NaN = __base::has_signaling_NaN;
|
||||
static const float_denorm_style has_denorm = __base::has_denorm;
|
||||
static const bool has_denorm_loss = __base::has_denorm_loss;
|
||||
_LIBCPP_INLINE_VISIBILITY static type infinity() _NOEXCEPT {return __base::infinity();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type denorm_min() _NOEXCEPT {return __base::denorm_min();}
|
||||
static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
|
||||
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
|
||||
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
|
||||
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
|
||||
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}
|
||||
|
||||
static const bool is_iec559 = __base::is_iec559;
|
||||
static const bool is_bounded = __base::is_bounded;
|
||||
static const bool is_modulo = __base::is_modulo;
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
|
||||
static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
|
||||
static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;
|
||||
|
||||
static const bool traps = __base::traps;
|
||||
static const bool tinyness_before = __base::tinyness_before;
|
||||
static const float_round_style round_style = __base::round_style;
|
||||
static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
@ -531,43 +531,43 @@ class _LIBCPP_VISIBLE numeric_limits<volatile _Tp>
|
||||
typedef numeric_limits<_Tp> __base;
|
||||
typedef _Tp type;
|
||||
public:
|
||||
static const bool is_specialized = __base::is_specialized;
|
||||
_LIBCPP_INLINE_VISIBILITY static type min() _NOEXCEPT {return __base::min();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type max() _NOEXCEPT {return __base::max();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type lowest() _NOEXCEPT {return __base::lowest();}
|
||||
static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}
|
||||
|
||||
static const int digits = __base::digits;
|
||||
static const int digits10 = __base::digits10;
|
||||
static const int max_digits10 = __base::max_digits10;
|
||||
static const bool is_signed = __base::is_signed;
|
||||
static const bool is_integer = __base::is_integer;
|
||||
static const bool is_exact = __base::is_exact;
|
||||
static const int radix = __base::radix;
|
||||
_LIBCPP_INLINE_VISIBILITY static type epsilon() _NOEXCEPT {return __base::epsilon();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type round_error() _NOEXCEPT {return __base::round_error();}
|
||||
static _LIBCPP_CONSTEXPR const int digits = __base::digits;
|
||||
static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10;
|
||||
static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10;
|
||||
static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
|
||||
static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
|
||||
static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
|
||||
static _LIBCPP_CONSTEXPR const int radix = __base::radix;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}
|
||||
|
||||
static const int min_exponent = __base::min_exponent;
|
||||
static const int min_exponent10 = __base::min_exponent10;
|
||||
static const int max_exponent = __base::max_exponent;
|
||||
static const int max_exponent10 = __base::max_exponent10;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10;
|
||||
|
||||
static const bool has_infinity = __base::has_infinity;
|
||||
static const bool has_quiet_NaN = __base::has_quiet_NaN;
|
||||
static const bool has_signaling_NaN = __base::has_signaling_NaN;
|
||||
static const float_denorm_style has_denorm = __base::has_denorm;
|
||||
static const bool has_denorm_loss = __base::has_denorm_loss;
|
||||
_LIBCPP_INLINE_VISIBILITY static type infinity() _NOEXCEPT {return __base::infinity();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type denorm_min() _NOEXCEPT {return __base::denorm_min();}
|
||||
static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
|
||||
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
|
||||
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
|
||||
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
|
||||
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}
|
||||
|
||||
static const bool is_iec559 = __base::is_iec559;
|
||||
static const bool is_bounded = __base::is_bounded;
|
||||
static const bool is_modulo = __base::is_modulo;
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
|
||||
static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
|
||||
static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;
|
||||
|
||||
static const bool traps = __base::traps;
|
||||
static const bool tinyness_before = __base::tinyness_before;
|
||||
static const float_round_style round_style = __base::round_style;
|
||||
static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
@ -577,43 +577,43 @@ class _LIBCPP_VISIBLE numeric_limits<const volatile _Tp>
|
||||
typedef numeric_limits<_Tp> __base;
|
||||
typedef _Tp type;
|
||||
public:
|
||||
static const bool is_specialized = __base::is_specialized;
|
||||
_LIBCPP_INLINE_VISIBILITY static type min() _NOEXCEPT {return __base::min();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type max() _NOEXCEPT {return __base::max();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type lowest() _NOEXCEPT {return __base::lowest();}
|
||||
static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}
|
||||
|
||||
static const int digits = __base::digits;
|
||||
static const int digits10 = __base::digits10;
|
||||
static const int max_digits10 = __base::max_digits10;
|
||||
static const bool is_signed = __base::is_signed;
|
||||
static const bool is_integer = __base::is_integer;
|
||||
static const bool is_exact = __base::is_exact;
|
||||
static const int radix = __base::radix;
|
||||
_LIBCPP_INLINE_VISIBILITY static type epsilon() _NOEXCEPT {return __base::epsilon();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type round_error() _NOEXCEPT {return __base::round_error();}
|
||||
static _LIBCPP_CONSTEXPR const int digits = __base::digits;
|
||||
static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10;
|
||||
static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10;
|
||||
static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
|
||||
static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
|
||||
static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
|
||||
static _LIBCPP_CONSTEXPR const int radix = __base::radix;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}
|
||||
|
||||
static const int min_exponent = __base::min_exponent;
|
||||
static const int min_exponent10 = __base::min_exponent10;
|
||||
static const int max_exponent = __base::max_exponent;
|
||||
static const int max_exponent10 = __base::max_exponent10;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent;
|
||||
static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent;
|
||||
static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10;
|
||||
|
||||
static const bool has_infinity = __base::has_infinity;
|
||||
static const bool has_quiet_NaN = __base::has_quiet_NaN;
|
||||
static const bool has_signaling_NaN = __base::has_signaling_NaN;
|
||||
static const float_denorm_style has_denorm = __base::has_denorm;
|
||||
static const bool has_denorm_loss = __base::has_denorm_loss;
|
||||
_LIBCPP_INLINE_VISIBILITY static type infinity() _NOEXCEPT {return __base::infinity();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static type denorm_min() _NOEXCEPT {return __base::denorm_min();}
|
||||
static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
|
||||
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
|
||||
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
|
||||
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
|
||||
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
|
||||
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}
|
||||
|
||||
static const bool is_iec559 = __base::is_iec559;
|
||||
static const bool is_bounded = __base::is_bounded;
|
||||
static const bool is_modulo = __base::is_modulo;
|
||||
static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
|
||||
static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
|
||||
static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;
|
||||
|
||||
static const bool traps = __base::traps;
|
||||
static const bool tinyness_before = __base::tinyness_before;
|
||||
static const float_round_style round_style = __base::round_style;
|
||||
static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
|
||||
static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
|
||||
static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
|
||||
};
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
@ -1685,39 +1685,21 @@ public:
|
||||
::new((void*)__p) _Tp();
|
||||
}
|
||||
# if defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES)
|
||||
|
||||
template <class _A0>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
!is_convertible<_A0, __rv<_A0> >::value,
|
||||
void
|
||||
>::type
|
||||
void
|
||||
construct(pointer __p, _A0& __a0)
|
||||
{
|
||||
::new((void*)__p) _Tp(__a0);
|
||||
}
|
||||
template <class _A0>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
!is_convertible<_A0, __rv<_A0> >::value,
|
||||
void
|
||||
>::type
|
||||
void
|
||||
construct(pointer __p, const _A0& __a0)
|
||||
{
|
||||
::new((void*)__p) _Tp(__a0);
|
||||
}
|
||||
template <class _A0>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_convertible<_A0, __rv<_A0> >::value,
|
||||
void
|
||||
>::type
|
||||
construct(pointer __p, _A0 __a0)
|
||||
{
|
||||
::new((void*)__p) _Tp(_VSTD::move(__a0));
|
||||
}
|
||||
# endif // defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES)
|
||||
template <class _A0, class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
@ -1793,39 +1775,21 @@ public:
|
||||
::new((void*)__p) _Tp();
|
||||
}
|
||||
# if defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES)
|
||||
|
||||
template <class _A0>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
!is_convertible<_A0, __rv<_A0> >::value,
|
||||
void
|
||||
>::type
|
||||
void
|
||||
construct(pointer __p, _A0& __a0)
|
||||
{
|
||||
::new((void*)__p) _Tp(__a0);
|
||||
}
|
||||
template <class _A0>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
!is_convertible<_A0, __rv<_A0> >::value,
|
||||
void
|
||||
>::type
|
||||
void
|
||||
construct(pointer __p, const _A0& __a0)
|
||||
{
|
||||
::new((void*)__p) _Tp(__a0);
|
||||
}
|
||||
template <class _A0>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_convertible<_A0, __rv<_A0> >::value,
|
||||
void
|
||||
>::type
|
||||
construct(pointer __p, _A0 __a0)
|
||||
{
|
||||
::new((void*)__p) _Tp(_VSTD::move(__a0));
|
||||
}
|
||||
# endif // defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES)
|
||||
template <class _A0, class _A1>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
@ -3086,6 +3050,18 @@ operator>=(nullptr_t, const unique_ptr<_T1, _D1>& __x)
|
||||
return !(nullptr < __x);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Dp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
unique_ptr<_Tp, _Dp>
|
||||
move(unique_ptr<_Tp, _Dp>& __t)
|
||||
{
|
||||
return unique_ptr<_Tp, _Dp>(__rv<unique_ptr<_Tp, _Dp> >(__t));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template <class _Tp> struct hash;
|
||||
|
||||
// We use murmur2 when size_t is 32 bits, and cityhash64 when size_t
|
||||
|
189
include/random
189
include/random
@ -1659,7 +1659,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
||||
template <class _Sseq, class _Engine>
|
||||
struct __is_seed_sequence
|
||||
{
|
||||
static const bool value =
|
||||
static _LIBCPP_CONSTEXPR const bool value =
|
||||
!is_convertible<_Sseq, typename _Engine::result_type>::value &&
|
||||
!is_same<typename remove_cv<_Sseq>::type, _Engine>::value;
|
||||
};
|
||||
@ -1837,24 +1837,24 @@ public:
|
||||
private:
|
||||
result_type __x_;
|
||||
|
||||
static const result_type _Mp = result_type(~0);
|
||||
static _LIBCPP_CONSTEXPR const result_type _Mp = result_type(~0);
|
||||
|
||||
static_assert(__m == 0 || __a < __m, "linear_congruential_engine invalid parameters");
|
||||
static_assert(__m == 0 || __c < __m, "linear_congruential_engine invalid parameters");
|
||||
public:
|
||||
static const result_type _Min = __c == 0u ? 1u: 0u;
|
||||
static const result_type _Max = __m - 1u;
|
||||
static _LIBCPP_CONSTEXPR const result_type _Min = __c == 0u ? 1u: 0u;
|
||||
static _LIBCPP_CONSTEXPR const result_type _Max = __m - 1u;
|
||||
static_assert(_Min < _Max, "linear_congruential_engine invalid parameters");
|
||||
|
||||
// engine characteristics
|
||||
static const/*expr*/ result_type multiplier = __a;
|
||||
static const/*expr*/ result_type increment = __c;
|
||||
static const/*expr*/ result_type modulus = __m;
|
||||
static _LIBCPP_CONSTEXPR const result_type multiplier = __a;
|
||||
static _LIBCPP_CONSTEXPR const result_type increment = __c;
|
||||
static _LIBCPP_CONSTEXPR const result_type modulus = __m;
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
static const/*expr*/ result_type min() {return _Min;}
|
||||
static _LIBCPP_CONSTEXPR result_type min() {return _Min;}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
static const/*expr*/ result_type max() {return _Max;}
|
||||
static const/*expr*/ result_type default_seed = 1u;
|
||||
static _LIBCPP_CONSTEXPR result_type max() {return _Max;}
|
||||
static _LIBCPP_CONSTEXPR const result_type default_seed = 1u;
|
||||
|
||||
// constructors and seeding functions
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
@ -2074,7 +2074,7 @@ private:
|
||||
|
||||
static_assert( 0 < __m, "mersenne_twister_engine invalid parameters");
|
||||
static_assert(__m <= __n, "mersenne_twister_engine invalid parameters");
|
||||
static const result_type _Dt = numeric_limits<result_type>::digits;
|
||||
static _LIBCPP_CONSTEXPR const result_type _Dt = numeric_limits<result_type>::digits;
|
||||
static_assert(__w <= _Dt, "mersenne_twister_engine invalid parameters");
|
||||
static_assert( 2 <= __w, "mersenne_twister_engine invalid parameters");
|
||||
static_assert(__r <= __w, "mersenne_twister_engine invalid parameters");
|
||||
@ -2083,9 +2083,9 @@ private:
|
||||
static_assert(__t <= __w, "mersenne_twister_engine invalid parameters");
|
||||
static_assert(__l <= __w, "mersenne_twister_engine invalid parameters");
|
||||
public:
|
||||
static const result_type _Min = 0;
|
||||
static const result_type _Max = __w == _Dt ? result_type(~0) :
|
||||
(result_type(1) << __w) - result_type(1);
|
||||
static _LIBCPP_CONSTEXPR const result_type _Min = 0;
|
||||
static _LIBCPP_CONSTEXPR const result_type _Max = __w == _Dt ? result_type(~0) :
|
||||
(result_type(1) << __w) - result_type(1);
|
||||
static_assert(_Min < _Max, "mersenne_twister_engine invalid parameters");
|
||||
static_assert(__a <= _Max, "mersenne_twister_engine invalid parameters");
|
||||
static_assert(__b <= _Max, "mersenne_twister_engine invalid parameters");
|
||||
@ -2094,24 +2094,24 @@ public:
|
||||
static_assert(__f <= _Max, "mersenne_twister_engine invalid parameters");
|
||||
|
||||
// engine characteristics
|
||||
static const/*expr*/ size_t word_size = __w;
|
||||
static const/*expr*/ size_t state_size = __n;
|
||||
static const/*expr*/ size_t shift_size = __m;
|
||||
static const/*expr*/ size_t mask_bits = __r;
|
||||
static const/*expr*/ result_type xor_mask = __a;
|
||||
static const/*expr*/ size_t tempering_u = __u;
|
||||
static const/*expr*/ result_type tempering_d = __d;
|
||||
static const/*expr*/ size_t tempering_s = __s;
|
||||
static const/*expr*/ result_type tempering_b = __b;
|
||||
static const/*expr*/ size_t tempering_t = __t;
|
||||
static const/*expr*/ result_type tempering_c = __c;
|
||||
static const/*expr*/ size_t tempering_l = __l;
|
||||
static const/*expr*/ result_type initialization_multiplier = __f;
|
||||
static _LIBCPP_CONSTEXPR const size_t word_size = __w;
|
||||
static _LIBCPP_CONSTEXPR const size_t state_size = __n;
|
||||
static _LIBCPP_CONSTEXPR const size_t shift_size = __m;
|
||||
static _LIBCPP_CONSTEXPR const size_t mask_bits = __r;
|
||||
static _LIBCPP_CONSTEXPR const result_type xor_mask = __a;
|
||||
static _LIBCPP_CONSTEXPR const size_t tempering_u = __u;
|
||||
static _LIBCPP_CONSTEXPR const result_type tempering_d = __d;
|
||||
static _LIBCPP_CONSTEXPR const size_t tempering_s = __s;
|
||||
static _LIBCPP_CONSTEXPR const result_type tempering_b = __b;
|
||||
static _LIBCPP_CONSTEXPR const size_t tempering_t = __t;
|
||||
static _LIBCPP_CONSTEXPR const result_type tempering_c = __c;
|
||||
static _LIBCPP_CONSTEXPR const size_t tempering_l = __l;
|
||||
static _LIBCPP_CONSTEXPR const result_type initialization_multiplier = __f;
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
static const/*expr*/ result_type min() { return _Min; }
|
||||
static _LIBCPP_CONSTEXPR result_type min() { return _Min; }
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
static const/*expr*/ result_type max() { return _Max; }
|
||||
static const/*expr*/ result_type default_seed = 5489u;
|
||||
static _LIBCPP_CONSTEXPR result_type max() { return _Max; }
|
||||
static _LIBCPP_CONSTEXPR const result_type default_seed = 5489u;
|
||||
|
||||
// constructors and seeding functions
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
@ -2462,26 +2462,26 @@ private:
|
||||
result_type __c_;
|
||||
size_t __i_;
|
||||
|
||||
static const result_type _Dt = numeric_limits<result_type>::digits;
|
||||
static _LIBCPP_CONSTEXPR const result_type _Dt = numeric_limits<result_type>::digits;
|
||||
static_assert( 0 < __w, "subtract_with_carry_engine invalid parameters");
|
||||
static_assert(__w <= _Dt, "subtract_with_carry_engine invalid parameters");
|
||||
static_assert( 0 < __s, "subtract_with_carry_engine invalid parameters");
|
||||
static_assert(__s < __r, "subtract_with_carry_engine invalid parameters");
|
||||
public:
|
||||
static const result_type _Min = 0;
|
||||
static const result_type _Max = __w == _Dt ? result_type(~0) :
|
||||
(result_type(1) << __w) - result_type(1);
|
||||
static _LIBCPP_CONSTEXPR const result_type _Min = 0;
|
||||
static _LIBCPP_CONSTEXPR const result_type _Max = __w == _Dt ? result_type(~0) :
|
||||
(result_type(1) << __w) - result_type(1);
|
||||
static_assert(_Min < _Max, "subtract_with_carry_engine invalid parameters");
|
||||
|
||||
// engine characteristics
|
||||
static const/*expr*/ size_t word_size = __w;
|
||||
static const/*expr*/ size_t short_lag = __s;
|
||||
static const/*expr*/ size_t long_lag = __r;
|
||||
static _LIBCPP_CONSTEXPR const size_t word_size = __w;
|
||||
static _LIBCPP_CONSTEXPR const size_t short_lag = __s;
|
||||
static _LIBCPP_CONSTEXPR const size_t long_lag = __r;
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
static const/*expr*/ result_type min() { return _Min; }
|
||||
static _LIBCPP_CONSTEXPR result_type min() { return _Min; }
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
static const/*expr*/ result_type max() { return _Max; }
|
||||
static const/*expr*/ result_type default_seed = 19780503u;
|
||||
static _LIBCPP_CONSTEXPR result_type max() { return _Max; }
|
||||
static _LIBCPP_CONSTEXPR const result_type default_seed = 19780503u;
|
||||
|
||||
// constructors and seeding functions
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
@ -2733,17 +2733,21 @@ public:
|
||||
typedef typename _Engine::result_type result_type;
|
||||
|
||||
// engine characteristics
|
||||
static const/*expr*/ size_t block_size = __p;
|
||||
static const/*expr*/ size_t used_block = __r;
|
||||
static _LIBCPP_CONSTEXPR const size_t block_size = __p;
|
||||
static _LIBCPP_CONSTEXPR const size_t used_block = __r;
|
||||
|
||||
// Temporary work around for lack of constexpr
|
||||
#ifdef _LIBCPP_HAS_NO_CONSTEXPR
|
||||
static const result_type _Min = _Engine::_Min;
|
||||
static const result_type _Max = _Engine::_Max;
|
||||
#else
|
||||
static _LIBCPP_CONSTEXPR const result_type _Min = _Engine::min();
|
||||
static _LIBCPP_CONSTEXPR const result_type _Max = _Engine::max();
|
||||
#endif
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
static const/*expr*/ result_type min() { return _Engine::min(); }
|
||||
static _LIBCPP_CONSTEXPR result_type min() { return _Engine::min(); }
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
static const/*expr*/ result_type max() { return _Engine::max(); }
|
||||
static _LIBCPP_CONSTEXPR result_type max() { return _Engine::max(); }
|
||||
|
||||
// constructors and seeding functions
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
@ -2889,12 +2893,12 @@ class _LIBCPP_VISIBLE independent_bits_engine
|
||||
template <class _UI, _UI _R0, size_t _Wp, size_t _Mp>
|
||||
class __get_n
|
||||
{
|
||||
static const size_t _Dt = numeric_limits<_UI>::digits;
|
||||
static const size_t _Np = _Wp / _Mp + (_Wp % _Mp != 0);
|
||||
static const size_t _W0 = _Wp / _Np;
|
||||
static const _UI _Y0 = _W0 >= _Dt ? 0 : (_R0 >> _W0) << _W0;
|
||||
static _LIBCPP_CONSTEXPR const size_t _Dt = numeric_limits<_UI>::digits;
|
||||
static _LIBCPP_CONSTEXPR const size_t _Np = _Wp / _Mp + (_Wp % _Mp != 0);
|
||||
static _LIBCPP_CONSTEXPR const size_t _W0 = _Wp / _Np;
|
||||
static _LIBCPP_CONSTEXPR const _UI _Y0 = _W0 >= _Dt ? 0 : (_R0 >> _W0) << _W0;
|
||||
public:
|
||||
static const size_t value = _R0 - _Y0 > _Y0 / _Np ? _Np + 1 : _Np;
|
||||
static _LIBCPP_CONSTEXPR const size_t value = _R0 - _Y0 > _Y0 / _Np ? _Np + 1 : _Np;
|
||||
};
|
||||
public:
|
||||
// types
|
||||
@ -2903,7 +2907,7 @@ public:
|
||||
private:
|
||||
_Engine __e_;
|
||||
|
||||
static const result_type _Dt = numeric_limits<result_type>::digits;
|
||||
static _LIBCPP_CONSTEXPR const result_type _Dt = numeric_limits<result_type>::digits;
|
||||
static_assert( 0 < __w, "independent_bits_engine invalid parameters");
|
||||
static_assert(__w <= _Dt, "independent_bits_engine invalid parameters");
|
||||
|
||||
@ -2914,36 +2918,40 @@ private:
|
||||
result_type,
|
||||
_Engine_result_type
|
||||
>::type _Working_result_type;
|
||||
// Temporary work around for lack of constexpr
|
||||
#ifdef _LIBCPP_HAS_NO_CONSTEXPR
|
||||
static const _Working_result_type _Rp = _Engine::_Max - _Engine::_Min
|
||||
+ _Working_result_type(1);
|
||||
static const size_t __m = __log2<_Working_result_type, _Rp>::value;
|
||||
static const size_t __n = __get_n<_Working_result_type, _Rp, __w, __m>::value;
|
||||
static const size_t __w0 = __w / __n;
|
||||
static const size_t __n0 = __n - __w % __n;
|
||||
static const size_t _WDt = numeric_limits<_Working_result_type>::digits;
|
||||
static const size_t _EDt = numeric_limits<_Engine_result_type>::digits;
|
||||
static const _Working_result_type __y0 = __w0 >= _WDt ? 0 :
|
||||
(_Rp >> __w0) << __w0;
|
||||
static const _Working_result_type __y1 = __w0 >= _WDt - 1 ? 0 :
|
||||
(_Rp >> (__w0+1)) << (__w0+1);
|
||||
static const _Engine_result_type __mask0 = __w0 > 0 ?
|
||||
+ _Working_result_type(1);
|
||||
#else
|
||||
static _LIBCPP_CONSTEXPR const _Working_result_type _Rp = _Engine::max() - _Engine::min()
|
||||
+ _Working_result_type(1);
|
||||
#endif
|
||||
static _LIBCPP_CONSTEXPR const size_t __m = __log2<_Working_result_type, _Rp>::value;
|
||||
static _LIBCPP_CONSTEXPR const size_t __n = __get_n<_Working_result_type, _Rp, __w, __m>::value;
|
||||
static _LIBCPP_CONSTEXPR const size_t __w0 = __w / __n;
|
||||
static _LIBCPP_CONSTEXPR const size_t __n0 = __n - __w % __n;
|
||||
static _LIBCPP_CONSTEXPR const size_t _WDt = numeric_limits<_Working_result_type>::digits;
|
||||
static _LIBCPP_CONSTEXPR const size_t _EDt = numeric_limits<_Engine_result_type>::digits;
|
||||
static _LIBCPP_CONSTEXPR const _Working_result_type __y0 = __w0 >= _WDt ? 0 :
|
||||
(_Rp >> __w0) << __w0;
|
||||
static _LIBCPP_CONSTEXPR const _Working_result_type __y1 = __w0 >= _WDt - 1 ? 0 :
|
||||
(_Rp >> (__w0+1)) << (__w0+1);
|
||||
static _LIBCPP_CONSTEXPR const _Engine_result_type __mask0 = __w0 > 0 ?
|
||||
_Engine_result_type(~0) >> (_EDt - __w0) :
|
||||
_Engine_result_type(0);
|
||||
static const _Engine_result_type __mask1 = __w0 < _EDt - 1 ?
|
||||
static _LIBCPP_CONSTEXPR const _Engine_result_type __mask1 = __w0 < _EDt - 1 ?
|
||||
_Engine_result_type(~0) >> (_EDt - (__w0 + 1)) :
|
||||
_Engine_result_type(~0);
|
||||
public:
|
||||
static const result_type _Min = 0;
|
||||
static const result_type _Max = __w == _Dt ? result_type(~0) :
|
||||
(result_type(1) << __w) - result_type(1);
|
||||
static _LIBCPP_CONSTEXPR const result_type _Min = 0;
|
||||
static _LIBCPP_CONSTEXPR const result_type _Max = __w == _Dt ? result_type(~0) :
|
||||
(result_type(1) << __w) - result_type(1);
|
||||
static_assert(_Min < _Max, "independent_bits_engine invalid parameters");
|
||||
|
||||
// engine characteristics
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
static const/*expr*/ result_type min() { return _Min; }
|
||||
static _LIBCPP_CONSTEXPR result_type min() { return _Min; }
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
static const/*expr*/ result_type max() { return _Max; }
|
||||
static _LIBCPP_CONSTEXPR result_type max() { return _Max; }
|
||||
|
||||
// constructors and seeding functions
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
@ -3121,23 +3129,23 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
|
||||
template <uint64_t _Xp, uint64_t _Yp>
|
||||
struct __ugcd
|
||||
{
|
||||
static const uint64_t value = __ugcd<_Yp, _Xp % _Yp>::value;
|
||||
static _LIBCPP_CONSTEXPR const uint64_t value = __ugcd<_Yp, _Xp % _Yp>::value;
|
||||
};
|
||||
|
||||
template <uint64_t _Xp>
|
||||
struct __ugcd<_Xp, 0>
|
||||
{
|
||||
static const uint64_t value = _Xp;
|
||||
static _LIBCPP_CONSTEXPR const uint64_t value = _Xp;
|
||||
};
|
||||
|
||||
template <uint64_t _Np, uint64_t _Dp>
|
||||
class __uratio
|
||||
{
|
||||
static_assert(_Dp != 0, "__uratio divide by 0");
|
||||
static const uint64_t __gcd = __ugcd<_Np, _Dp>::value;
|
||||
static _LIBCPP_CONSTEXPR const uint64_t __gcd = __ugcd<_Np, _Dp>::value;
|
||||
public:
|
||||
static const uint64_t num = _Np / __gcd;
|
||||
static const uint64_t den = _Dp / __gcd;
|
||||
static _LIBCPP_CONSTEXPR const uint64_t num = _Np / __gcd;
|
||||
static _LIBCPP_CONSTEXPR const uint64_t den = _Dp / __gcd;
|
||||
|
||||
typedef __uratio<num, den> type;
|
||||
};
|
||||
@ -3157,17 +3165,22 @@ private:
|
||||
|
||||
public:
|
||||
// engine characteristics
|
||||
static const/*expr*/ size_t table_size = __k;
|
||||
static _LIBCPP_CONSTEXPR const size_t table_size = __k;
|
||||
|
||||
#ifdef _LIBCPP_HAS_NO_CONSTEXPR
|
||||
static const result_type _Min = _Engine::_Min;
|
||||
static const result_type _Max = _Engine::_Max;
|
||||
#else
|
||||
static _LIBCPP_CONSTEXPR const result_type _Min = _Engine::min();
|
||||
static _LIBCPP_CONSTEXPR const result_type _Max = _Engine::max();
|
||||
#endif
|
||||
static_assert(_Min < _Max, "shuffle_order_engine invalid parameters");
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
static const/*expr*/ result_type min() { return _Min; }
|
||||
static _LIBCPP_CONSTEXPR result_type min() { return _Min; }
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
static const/*expr*/ result_type max() { return _Max; }
|
||||
static _LIBCPP_CONSTEXPR result_type max() { return _Max; }
|
||||
|
||||
static const unsigned long long _Rp = _Max - _Min + 1ull;
|
||||
static _LIBCPP_CONSTEXPR const unsigned long long _Rp = _Max - _Min + 1ull;
|
||||
|
||||
// constructors and seeding functions
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
@ -3370,13 +3383,13 @@ public:
|
||||
typedef unsigned result_type;
|
||||
|
||||
// generator characteristics
|
||||
static const result_type _Min = 0;
|
||||
static const result_type _Max = 0xFFFFFFFFu;
|
||||
static _LIBCPP_CONSTEXPR const result_type _Min = 0;
|
||||
static _LIBCPP_CONSTEXPR const result_type _Max = 0xFFFFFFFFu;
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
static constexpr result_type min() { return _Min;}
|
||||
static _LIBCPP_CONSTEXPR result_type min() { return _Min;}
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
static constexpr result_type max() { return _Max;}
|
||||
static _LIBCPP_CONSTEXPR result_type max() { return _Max;}
|
||||
|
||||
// constructors
|
||||
explicit random_device(const string& __token = "/dev/urandom");
|
||||
@ -3522,13 +3535,17 @@ generate_canonical(_URNG& __g)
|
||||
{
|
||||
const size_t _Dt = numeric_limits<_RealType>::digits;
|
||||
const size_t __b = _Dt < __bits ? _Dt : __bits;
|
||||
#ifdef _LIBCPP_HAS_NO_CONSTEXPR
|
||||
const size_t __logR = __log2<uint64_t, _URNG::_Max - _URNG::_Min + uint64_t(1)>::value;
|
||||
#else
|
||||
const size_t __logR = __log2<uint64_t, _URNG::max() - _URNG::min() + uint64_t(1)>::value;
|
||||
#endif
|
||||
const size_t __k = __b / __logR + (__b % __logR != 0) + (__b == 0);
|
||||
const _RealType _Rp = _URNG::_Max - _URNG::_Min + _RealType(1);
|
||||
const _RealType _Rp = _URNG::max() - _URNG::min() + _RealType(1);
|
||||
_RealType __base = _Rp;
|
||||
_RealType _Sp = __g() - _URNG::_Min;
|
||||
_RealType _Sp = __g() - _URNG::min();
|
||||
for (size_t __i = 1; __i < __k; ++__i, __base *= _Rp)
|
||||
_Sp += (__g() - _URNG::_Min) * __base;
|
||||
_Sp += (__g() - _URNG::min()) * __base;
|
||||
return _Sp / __base;
|
||||
}
|
||||
|
||||
|
@ -366,8 +366,8 @@ class _LIBCPP_VISIBLE error_category
|
||||
public:
|
||||
virtual ~error_category() _NOEXCEPT;
|
||||
|
||||
private:
|
||||
error_category() _NOEXCEPT;
|
||||
private:
|
||||
error_category(const error_category&);// = delete;
|
||||
error_category& operator=(const error_category&);// = delete;
|
||||
|
||||
|
@ -552,7 +552,7 @@ public:
|
||||
) {}
|
||||
|
||||
template <class ..._Up,
|
||||
class = typename enable_if
|
||||
typename enable_if
|
||||
<
|
||||
sizeof...(_Up) <= sizeof...(_Tp) &&
|
||||
__tuple_convertible
|
||||
@ -562,8 +562,40 @@ public:
|
||||
sizeof...(_Up) < sizeof...(_Tp) ?
|
||||
sizeof...(_Up) :
|
||||
sizeof...(_Tp)>::type
|
||||
>::value
|
||||
>::type
|
||||
>::value,
|
||||
bool
|
||||
>::type = false
|
||||
>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
tuple(_Up&&... __u)
|
||||
: base_(typename __make_tuple_indices<sizeof...(_Up)>::type(),
|
||||
typename __make_tuple_types<tuple, sizeof...(_Up)>::type(),
|
||||
typename __make_tuple_indices<sizeof...(_Tp), sizeof...(_Up)>::type(),
|
||||
typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type(),
|
||||
_VSTD::forward<_Up>(__u)...) {}
|
||||
|
||||
template <class ..._Up,
|
||||
typename enable_if
|
||||
<
|
||||
sizeof...(_Up) <= sizeof...(_Tp) &&
|
||||
__tuple_constructible
|
||||
<
|
||||
tuple<_Up...>,
|
||||
typename __make_tuple_types<tuple,
|
||||
sizeof...(_Up) < sizeof...(_Tp) ?
|
||||
sizeof...(_Up) :
|
||||
sizeof...(_Tp)>::type
|
||||
>::value &&
|
||||
!__tuple_convertible
|
||||
<
|
||||
tuple<_Up...>,
|
||||
typename __make_tuple_types<tuple,
|
||||
sizeof...(_Up) < sizeof...(_Tp) ?
|
||||
sizeof...(_Up) :
|
||||
sizeof...(_Tp)>::type
|
||||
>::value,
|
||||
bool
|
||||
>::type =false
|
||||
>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
explicit
|
||||
@ -598,15 +630,29 @@ public:
|
||||
_VSTD::forward<_Up>(__u)...) {}
|
||||
|
||||
template <class _Tuple,
|
||||
class = typename enable_if
|
||||
typename enable_if
|
||||
<
|
||||
__tuple_convertible<_Tuple, tuple>::value
|
||||
>::type
|
||||
__tuple_convertible<_Tuple, tuple>::value,
|
||||
bool
|
||||
>::type = false
|
||||
>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
tuple(_Tuple&& __t)
|
||||
: base_(_VSTD::forward<_Tuple>(__t)) {}
|
||||
|
||||
template <class _Tuple,
|
||||
typename enable_if
|
||||
<
|
||||
__tuple_constructible<_Tuple, tuple>::value &&
|
||||
!__tuple_convertible<_Tuple, tuple>::value,
|
||||
bool
|
||||
>::type = false
|
||||
>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
explicit
|
||||
tuple(_Tuple&& __t)
|
||||
: base_(_VSTD::forward<_Tuple>(__t)) {}
|
||||
|
||||
template <class _Alloc, class _Tuple,
|
||||
class = typename enable_if
|
||||
<
|
||||
|
@ -163,22 +163,15 @@ struct __two {char _[2];};
|
||||
template <class _Tp, _Tp __v>
|
||||
struct _LIBCPP_VISIBLE integral_constant
|
||||
{
|
||||
static constexpr _Tp value = __v;
|
||||
static _LIBCPP_CONSTEXPR const _Tp value = __v;
|
||||
typedef _Tp value_type;
|
||||
typedef integral_constant type;
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
#ifndef _LIBCPP_HAS_NO_CONSTEXPR
|
||||
constexpr
|
||||
#endif
|
||||
operator value_type()
|
||||
#ifdef _LIBCPP_HAS_NO_CONSTEXPR
|
||||
const
|
||||
#endif
|
||||
{return value;}
|
||||
_LIBCPP_CONSTEXPR operator value_type() const {return value;}
|
||||
};
|
||||
|
||||
template <class _Tp, _Tp __v>
|
||||
constexpr _Tp integral_constant<_Tp, __v>::value;
|
||||
_LIBCPP_CONSTEXPR const _Tp integral_constant<_Tp, __v>::value;
|
||||
|
||||
typedef integral_constant<bool, true> true_type;
|
||||
typedef integral_constant<bool, false> false_type;
|
||||
@ -1304,6 +1297,31 @@ forward(typename std::remove_reference<_Tp>::type&& __t) _NOEXCEPT
|
||||
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_Tp&
|
||||
move(_Tp& __t)
|
||||
{
|
||||
return __t;
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
const _Tp&
|
||||
move(const _Tp& __t)
|
||||
{
|
||||
return __t;
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
_Tp&
|
||||
forward(typename std::remove_reference<_Tp>::type& __t) _NOEXCEPT
|
||||
{
|
||||
return __t;
|
||||
}
|
||||
|
||||
|
||||
template <class _Tp>
|
||||
class __rv
|
||||
{
|
||||
@ -1316,90 +1334,6 @@ public:
|
||||
explicit __rv(_Trr& __t) : t_(__t) {}
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
!is_convertible<_Tp, __rv<_Tp> >::value,
|
||||
_Tp&
|
||||
>::type
|
||||
move(_Tp& __t)
|
||||
{
|
||||
return __t;
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
!is_convertible<_Tp, __rv<_Tp> >::value,
|
||||
const _Tp&
|
||||
>::type
|
||||
move(const _Tp& __t)
|
||||
{
|
||||
return __t;
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_convertible<_Tp, __rv<_Tp> >::value,
|
||||
_Tp
|
||||
>::type
|
||||
move(_Tp& __t)
|
||||
{
|
||||
return _Tp(__rv<_Tp>(__t));
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
!is_convertible<_Tp, __rv<_Tp> >::value,
|
||||
typename add_lvalue_reference<_Tp>::type
|
||||
>::type
|
||||
forward(_Up& __t)
|
||||
{
|
||||
return __t;
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
!is_convertible<_Tp, __rv<_Tp> >::value,
|
||||
typename add_lvalue_reference<_Tp>::type
|
||||
>::type
|
||||
forward(const _Up& __t)
|
||||
{
|
||||
return __t;
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_convertible<_Tp, __rv<_Tp> >::value,
|
||||
_Tp
|
||||
>::type
|
||||
forward(_Up& __t)
|
||||
{
|
||||
return _Tp(__rv<_Tp>(__t));
|
||||
}
|
||||
|
||||
template <class _Tp, class _Up>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_convertible<_Tp, __rv<_Tp> >::value,
|
||||
_Tp
|
||||
>::type
|
||||
forward(const _Up& __t)
|
||||
{
|
||||
return _Tp(__rv<_Tp>(__t));
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp>
|
||||
|
@ -206,8 +206,11 @@ move_if_noexcept(_Tp& __x) _NOEXCEPT
|
||||
}
|
||||
|
||||
struct _LIBCPP_VISIBLE piecewise_construct_t { };
|
||||
//constexpr
|
||||
#if defined(_LIBCPP_HAS_NO_CONSTEXPR) || defined(_LIBCPP_BUILDING_UTILITY)
|
||||
extern const piecewise_construct_t piecewise_construct;// = piecewise_construct_t();
|
||||
#else
|
||||
constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t();
|
||||
#endif
|
||||
|
||||
template <class _T1, class _T2>
|
||||
struct _LIBCPP_VISIBLE pair
|
||||
@ -221,7 +224,7 @@ struct _LIBCPP_VISIBLE pair
|
||||
// pair(const pair&) = default;
|
||||
// pair(pair&&) = default;
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY pair() : first(), second() {}
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR pair() : first(), second() {}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY pair(const _T1& __x, const _T2& __y)
|
||||
: first(__x), second(__y) {}
|
||||
|
@ -9,45 +9,58 @@
|
||||
|
||||
#include "__std_stream"
|
||||
#include "string"
|
||||
#include "new"
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
static __stdinbuf<char> __cin(stdin);
|
||||
static __stdoutbuf<char> __cout(stdout);
|
||||
static __stdoutbuf<char> __cerr(stderr);
|
||||
static __stdinbuf<wchar_t> __wcin(stdin);
|
||||
static __stdoutbuf<wchar_t> __wcout(stdout);
|
||||
static __stdoutbuf<wchar_t> __wcerr(stderr);
|
||||
alignas (__stdinbuf<char> ) static char __cin [sizeof(__stdinbuf <char>)];
|
||||
alignas (__stdoutbuf<char>) static char __cout[sizeof(__stdoutbuf<char>)];
|
||||
alignas (__stdoutbuf<char>) static char __cerr[sizeof(__stdoutbuf<char>)];
|
||||
alignas (__stdinbuf<wchar_t> ) static char __wcin [sizeof(__stdinbuf <wchar_t>)];
|
||||
alignas (__stdoutbuf<wchar_t>) static char __wcout[sizeof(__stdoutbuf<wchar_t>)];
|
||||
alignas (__stdoutbuf<wchar_t>) static char __wcerr[sizeof(__stdoutbuf<wchar_t>)];
|
||||
|
||||
istream cin(&__cin);
|
||||
ostream cout(&__cout);
|
||||
ostream cerr(&__cerr);
|
||||
ostream clog(&__cerr);
|
||||
wistream wcin(&__wcin);
|
||||
wostream wcout(&__wcout);
|
||||
wostream wcerr(&__wcerr);
|
||||
wostream wclog(&__wcerr);
|
||||
alignas (istream) char cin [sizeof(istream)];
|
||||
alignas (ostream) char cout[sizeof(ostream)];
|
||||
alignas (ostream) char cerr[sizeof(ostream)];
|
||||
alignas (ostream) char clog[sizeof(ostream)];
|
||||
alignas (wistream) char wcin [sizeof(wistream)];
|
||||
alignas (wostream) char wcout[sizeof(wostream)];
|
||||
alignas (wostream) char wcerr[sizeof(wostream)];
|
||||
alignas (wostream) char wclog[sizeof(wostream)];
|
||||
|
||||
ios_base::Init __start_std_streams;
|
||||
|
||||
ios_base::Init::Init()
|
||||
{
|
||||
cin.tie(&cout);
|
||||
_VSTD::unitbuf(cerr);
|
||||
cerr.tie(&cout);
|
||||
istream* cin_ptr = ::new(cin) istream(::new(__cin) __stdinbuf <char>(stdin) );
|
||||
ostream* cout_ptr = ::new(cout) ostream(::new(__cout) __stdoutbuf<char>(stdout));
|
||||
ostream* cerr_ptr = ::new(cerr) ostream(::new(__cerr) __stdoutbuf<char>(stderr));
|
||||
::new(clog) ostream(cerr_ptr->rdbuf());
|
||||
cin_ptr->tie(cout_ptr);
|
||||
_VSTD::unitbuf(*cerr_ptr);
|
||||
cerr_ptr->tie(cout_ptr);
|
||||
|
||||
wcin.tie(&wcout);
|
||||
_VSTD::unitbuf(wcerr);
|
||||
wcerr.tie(&wcout);
|
||||
wistream* wcin_ptr = ::new(wcin) wistream(::new(__wcin) __stdinbuf <wchar_t>(stdin) );
|
||||
wostream* wcout_ptr = ::new(wcout) wostream(::new(__wcout) __stdoutbuf<wchar_t>(stdout));
|
||||
wostream* wcerr_ptr = ::new(wcerr) wostream(::new(__wcerr) __stdoutbuf<wchar_t>(stderr));
|
||||
::new(wclog) wostream(wcerr_ptr->rdbuf());
|
||||
wcin_ptr->tie(wcout_ptr);
|
||||
_VSTD::unitbuf(*wcerr_ptr);
|
||||
wcerr_ptr->tie(wcout_ptr);
|
||||
}
|
||||
|
||||
ios_base::Init::~Init()
|
||||
{
|
||||
cout.flush();
|
||||
clog.flush();
|
||||
ostream* cout_ptr = (ostream*)cout;
|
||||
ostream* clog_ptr = (ostream*)clog;
|
||||
cout_ptr->flush();
|
||||
clog_ptr->flush();
|
||||
|
||||
wcout.flush();
|
||||
wclog.flush();
|
||||
wostream* wcout_ptr = (wostream*)wcout;
|
||||
wostream* wclog_ptr = (wostream*)wclog;
|
||||
wcout_ptr->flush();
|
||||
wclog_ptr->flush();
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
@ -15,7 +15,11 @@
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include "system_error"
|
||||
|
||||
// Use <cxxabi.h> to determine whether we're linking against libc++abi.
|
||||
#if __has_include(<cxxabi.h>)
|
||||
#include <cxxabi.h>
|
||||
#endif
|
||||
|
||||
// Note: optimize for size
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define _LIBCPP_BUILDING_UTILITY
|
||||
#include "utility"
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
Loading…
Reference in New Issue
Block a user