X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=boost%2Fboost%2Fdetail%2Flimits.hpp;h=5f478e3ece13d6c67eb0e686565a576c7f452122;hb=fce4ab0e79bfda9651d7d7f3c951bfb5d7516fc5;hp=df9298683a6395a0be7e16440cae01bc850f7dfb;hpb=46917487e34908b7221c02c3cebf359cb917b611;p=lyx.git diff --git a/boost/boost/detail/limits.hpp b/boost/boost/detail/limits.hpp index df9298683a..5f478e3ece 100644 --- a/boost/boost/detail/limits.hpp +++ b/boost/boost/detail/limits.hpp @@ -51,7 +51,7 @@ // bit layout, but about floating-point NaN (etc.) bit patterns. #if defined(__sparc) || defined(__sparc__) || defined(__powerpc__) || defined(__ppc__) || defined(__hppa) || defined(_MIPSEB) || defined(_POWER) #define BOOST_BIG_ENDIAN -#elif defined(__i386__) || defined(__alpha__) +#elif defined(__i386__) || defined(__alpha__) || defined(__ia64) || defined(__ia64__) #define BOOST_LITTLE_ENDIAN #else #error The file boost/detail/limits.hpp needs to be set up for your CPU type. @@ -133,8 +133,8 @@ public: BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_quiet_NaN, false); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_signaling_NaN, false); BOOST_STL_DECLARE_LIMITS_MEMBER(float_denorm_style, - has_denorm, - denorm_absent); + has_denorm, + denorm_absent); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_denorm_loss, false); static __number infinity() throw() { return __number(); } @@ -149,17 +149,17 @@ public: BOOST_STL_DECLARE_LIMITS_MEMBER(bool, traps, false); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, tinyness_before, false); BOOST_STL_DECLARE_LIMITS_MEMBER(float_round_style, - round_style, - round_toward_zero); + round_style, + round_toward_zero); }; // Base class for integers. template -class _Integer_limits : public _Numeric_limits_base<_Int> + _Int __imin, + _Int __imax, + int __idigits = -1> +class _Integer_limits : public _Numeric_limits_base<_Int> { public: BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_specialized, true); @@ -168,12 +168,12 @@ public: static _Int max() throw() { return __imax; } BOOST_STL_DECLARE_LIMITS_MEMBER(int, - digits, - (__idigits < 0) ? (int)(sizeof(_Int) * CHAR_BIT) - - (__imin == 0 ? 0 : 1) - : __idigits); - BOOST_STL_DECLARE_LIMITS_MEMBER(int, digits10, (digits * 301) / 1000); - // log 2 = 0.301029995664... + digits, + (__idigits < 0) ? (int)(sizeof(_Int) * CHAR_BIT) + - (__imin == 0 ? 0 : 1) + : __idigits); + BOOST_STL_DECLARE_LIMITS_MEMBER(int, digits10, (digits * 301) / 1000); + // log 2 = 0.301029995664... BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_signed, __imin != 0); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_integer, true); @@ -192,7 +192,7 @@ public: // sizeof(long double) == 16 const unsigned int _S_word[4] = { Word, 0, 0, 0 }; return *reinterpret_cast(&_S_word); - } + } }; #else @@ -203,22 +203,22 @@ public: // sizeof(long double) == 12, but only 10 bytes significant const unsigned int _S_word[4] = { 0, 0, 0, Word }; return *reinterpret_cast( - reinterpret_cast(&_S_word)+16- - (sizeof(Number) == 12 ? 10 : sizeof(Number))); - } + reinterpret_cast(&_S_word)+16- + (sizeof(Number) == 12 ? 10 : sizeof(Number))); + } }; #endif // Base class for floating-point numbers. template + int __Digits, int __Digits10, + int __MinExp, int __MaxExp, + int __MinExp10, int __MaxExp10, + unsigned int __InfinityWord, + unsigned int __QNaNWord, unsigned int __SNaNWord, + bool __IsIEC559, + float_round_style __RoundStyle> class _Floating_limits : public _Numeric_limits_base<__number> { public: @@ -240,11 +240,11 @@ public: BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_quiet_NaN, true); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_signaling_NaN, true); BOOST_STL_DECLARE_LIMITS_MEMBER(float_denorm_style, - has_denorm, - denorm_indeterminate); + has_denorm, + denorm_indeterminate); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_denorm_loss, false); - + static __number infinity() throw() { return float_helper<__number, __InfinityWord>::get_word(); } @@ -267,7 +267,7 @@ public: // The unspecialized class. -template +template class numeric_limits : public _Numeric_limits_base {}; // Specializations for all built-in integral types. @@ -356,41 +356,36 @@ class numeric_limits #if !defined(LONGLONG_MIN) # define LONGLONG_MIN (-LONGLONG_MAX - 1) -#endif +#endif -template<> -class numeric_limits - : public _Integer_limits -{}; -template<> -class numeric_limits - : public _Integer_limits -{}; +#if !defined(ULONGLONG_MIN) +# define ULONGLONG_MIN 0 +#endif #endif /* __GNUC__ */ // Specializations for all built-in floating-point type. template<> class numeric_limits - : public _Floating_limits + true, // conforms to iec559 + round_to_nearest> { public: static float min() throw() { return FLT_MIN; } @@ -401,24 +396,24 @@ public: }; template<> class numeric_limits - : public _Floating_limits + true, // conforms to iec559 + round_to_nearest> { public: static double min() throw() { return DBL_MIN; } @@ -429,24 +424,24 @@ public: }; template<> class numeric_limits - : public _Floating_limits + false, // Doesn't conform to iec559 + round_to_nearest> { public: static long double min() throw() { return LDBL_MIN; } @@ -463,3 +458,6 @@ public: // Local Variables: // mode:C++ // End: + + +