diff options
author | 2018-09-11 18:18:58 +0000 | |
---|---|---|
committer | 2018-09-11 18:18:58 +0000 | |
commit | 820e1f31efc1d6ed04795ba2e79f3044e1907492 (patch) | |
tree | 815cebb3734784074b661935c33f00bd5eb4d862 /lib/libcxx/include/limits | |
parent | Nuke unused LIST() ieee80211com_head. (diff) | |
download | wireguard-openbsd-820e1f31efc1d6ed04795ba2e79f3044e1907492.tar.xz wireguard-openbsd-820e1f31efc1d6ed04795ba2e79f3044e1907492.zip |
import of libc++ 6.0.0
Diffstat (limited to 'lib/libcxx/include/limits')
-rw-r--r-- | lib/libcxx/include/limits | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/lib/libcxx/include/limits b/lib/libcxx/include/limits index 80a1be40fe4..f530507f724 100644 --- a/lib/libcxx/include/limits +++ b/lib/libcxx/include/limits @@ -101,24 +101,25 @@ template<> class numeric_limits<cv long double>; } // std */ - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -#pragma GCC system_header -#endif - #include <__config> #include <type_traits> -#include <__undef_min_max> - -#if defined(_LIBCPP_MSVCRT) -#include "support/win32/limits_win32.h" +#if defined(_LIBCPP_COMPILER_MSVC) +#include "support/win32/limits_msvc_win32.h" #endif // _LIBCPP_MSVCRT #if defined(__IBMCPP__) #include "support/ibm/limits.h" #endif // __IBMCPP__ +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + + _LIBCPP_BEGIN_NAMESPACE_STD enum float_round_style @@ -182,14 +183,14 @@ protected: static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero; }; -template <class _Tp, int digits, bool is_signed> +template <class _Tp, int __digits, bool _IsSigned> struct __libcpp_compute_min { - static _LIBCPP_CONSTEXPR 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> +template <class _Tp, int __digits> +struct __libcpp_compute_min<_Tp, __digits, false> { static _LIBCPP_CONSTEXPR const _Tp value = _Tp(0); }; @@ -306,7 +307,7 @@ protected: 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; + static _LIBCPP_CONSTEXPR const int max_digits10 = 2+(digits * 30103l)/100000l; _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();} @@ -352,7 +353,7 @@ protected: 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; + static _LIBCPP_CONSTEXPR const int max_digits10 = 2+(digits * 30103l)/100000l; _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();} @@ -398,7 +399,7 @@ protected: 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; + static _LIBCPP_CONSTEXPR const int max_digits10 = 2+(digits * 30103l)/100000l; _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();} @@ -438,7 +439,7 @@ protected: }; template <class _Tp> -class _LIBCPP_TYPE_VIS_ONLY numeric_limits +class _LIBCPP_TEMPLATE_VIS numeric_limits : private __libcpp_numeric_limits<typename remove_cv<_Tp>::type> { typedef __libcpp_numeric_limits<typename remove_cv<_Tp>::type> __base; @@ -531,7 +532,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR const float_round_style numeric_limits<_Tp>::round_style; template <class _Tp> -class _LIBCPP_TYPE_VIS_ONLY numeric_limits<const _Tp> +class _LIBCPP_TEMPLATE_VIS numeric_limits<const _Tp> : private numeric_limits<_Tp> { typedef numeric_limits<_Tp> __base; @@ -624,7 +625,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR const float_round_style numeric_limits<const _Tp>::round_style; template <class _Tp> -class _LIBCPP_TYPE_VIS_ONLY numeric_limits<volatile _Tp> +class _LIBCPP_TEMPLATE_VIS numeric_limits<volatile _Tp> : private numeric_limits<_Tp> { typedef numeric_limits<_Tp> __base; @@ -717,7 +718,7 @@ template <class _Tp> _LIBCPP_CONSTEXPR const float_round_style numeric_limits<volatile _Tp>::round_style; template <class _Tp> -class _LIBCPP_TYPE_VIS_ONLY numeric_limits<const volatile _Tp> +class _LIBCPP_TEMPLATE_VIS numeric_limits<const volatile _Tp> : private numeric_limits<_Tp> { typedef numeric_limits<_Tp> __base; @@ -811,4 +812,6 @@ template <class _Tp> _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS + #endif // _LIBCPP_LIMITS |