From 43cd7615798ea22556f20bbd64cff1e0c691e1d0 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Thu, 3 May 2012 16:04:02 +0000 Subject: Import a new version of libc++ into the vendor branch. --- include/algorithm | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'include/algorithm') diff --git a/include/algorithm b/include/algorithm index f9c6843a60a7..d924a7de3f2d 100644 --- a/include/algorithm +++ b/include/algorithm @@ -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(); }; -- cgit v1.3