summaryrefslogtreecommitdiff
path: root/include/algorithm
diff options
context:
space:
mode:
authorDavid Chisnall <theraven@FreeBSD.org>2012-05-03 16:04:02 +0000
committerDavid Chisnall <theraven@FreeBSD.org>2012-05-03 16:04:02 +0000
commit43cd7615798ea22556f20bbd64cff1e0c691e1d0 (patch)
tree856ce4e42da23163e4316bca6732710e898f0265 /include/algorithm
parentacbeab898d6a7f4036c55962a2460aab3e0eda3f (diff)
Notes
Diffstat (limited to 'include/algorithm')
-rw-r--r--include/algorithm17
1 files changed, 11 insertions, 6 deletions
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();
};