diff options
author | theraven <theraven@FreeBSD.org> | 2012-05-03 17:44:07 +0000 |
---|---|---|
committer | theraven <theraven@FreeBSD.org> | 2012-05-03 17:44:07 +0000 |
commit | 011d8001e295ab428f3d73602d2e4fa0b248efc4 (patch) | |
tree | a0abba0a80f7ff64ba1a78df7fd8544414370f33 /contrib/libc++/include/algorithm | |
parent | 72d6cdcd97718bf58e38b0484a01bf5c6de14bc4 (diff) | |
download | FreeBSD-src-011d8001e295ab428f3d73602d2e4fa0b248efc4.zip FreeBSD-src-011d8001e295ab428f3d73602d2e4fa0b248efc4.tar.gz |
Import new version of libc++. Among other improvements, this comes with an
<atomic> header that works with clang 3.1 (and, importantly, the pre-3.1
snapshot currently in head)
Diffstat (limited to 'contrib/libc++/include/algorithm')
-rw-r--r-- | contrib/libc++/include/algorithm | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/contrib/libc++/include/algorithm b/contrib/libc++/include/algorithm index f9c6843..d924a7d 100644 --- a/contrib/libc++/include/algorithm +++ b/contrib/libc++/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(); }; |