|
@@ -1834,7 +1834,8 @@ public:
|
|
// constructors and seeding functions
|
|
// constructors and seeding functions
|
|
explicit linear_congruential_engine(result_type __s = default_seed)
|
|
explicit linear_congruential_engine(result_type __s = default_seed)
|
|
{seed(__s);}
|
|
{seed(__s);}
|
|
- template<class _Sseq> explicit linear_congruential_engine(_Sseq& __q)
|
|
|
|
|
|
+ template<class _Sseq> explicit linear_congruential_engine(_Sseq& __q,
|
|
|
|
+ typename enable_if<!is_convertible<_Sseq, result_type>::value>::type* = 0)
|
|
{seed(__q);}
|
|
{seed(__q);}
|
|
void seed(result_type __s = default_seed)
|
|
void seed(result_type __s = default_seed)
|
|
{seed(integral_constant<bool, __m == 0>(),
|
|
{seed(integral_constant<bool, __m == 0>(),
|
|
@@ -2073,7 +2074,8 @@ public:
|
|
// constructors and seeding functions
|
|
// constructors and seeding functions
|
|
explicit mersenne_twister_engine(result_type __sd = default_seed)
|
|
explicit mersenne_twister_engine(result_type __sd = default_seed)
|
|
{seed(__sd);}
|
|
{seed(__sd);}
|
|
- template<class _Sseq> explicit mersenne_twister_engine(_Sseq& __q)
|
|
|
|
|
|
+ template<class _Sseq> explicit mersenne_twister_engine(_Sseq& __q,
|
|
|
|
+ typename enable_if<!is_convertible<_Sseq, result_type>::value>::type* = 0)
|
|
{seed(__q);}
|
|
{seed(__q);}
|
|
void seed(result_type __sd = default_seed);
|
|
void seed(result_type __sd = default_seed);
|
|
template<class _Sseq>
|
|
template<class _Sseq>
|
|
@@ -2431,7 +2433,8 @@ public:
|
|
// constructors and seeding functions
|
|
// constructors and seeding functions
|
|
explicit subtract_with_carry_engine(result_type __sd = default_seed)
|
|
explicit subtract_with_carry_engine(result_type __sd = default_seed)
|
|
{seed(__sd);}
|
|
{seed(__sd);}
|
|
- template<class _Sseq> explicit subtract_with_carry_engine(_Sseq& __q)
|
|
|
|
|
|
+ template<class _Sseq> explicit subtract_with_carry_engine(_Sseq& __q,
|
|
|
|
+ typename enable_if<!is_convertible<_Sseq, result_type>::value>::type* = 0)
|
|
{seed(__q);}
|
|
{seed(__q);}
|
|
void seed(result_type __sd = default_seed)
|
|
void seed(result_type __sd = default_seed)
|
|
{seed(__sd, integral_constant<unsigned, 1 + (__w - 1) / 32>());}
|
|
{seed(__sd, integral_constant<unsigned, 1 + (__w - 1) / 32>());}
|
|
@@ -2680,14 +2683,26 @@ public:
|
|
|
|
|
|
// constructors and seeding functions
|
|
// constructors and seeding functions
|
|
discard_block_engine() : __n_(0) {}
|
|
discard_block_engine() : __n_(0) {}
|
|
-// explicit discard_block_engine(const _Engine& __e);
|
|
|
|
-// explicit discard_block_engine(_Engine&& __e);
|
|
|
|
|
|
+ explicit discard_block_engine(const _Engine& __e)
|
|
|
|
+ : __e_(__e), __n_(0) {}
|
|
|
|
+#ifdef _LIBCPP_MOVE
|
|
|
|
+ explicit discard_block_engine(_Engine&& __e)
|
|
|
|
+ : __e_(_STD::move(__e)), __n_(0) {}
|
|
|
|
+#endif
|
|
explicit discard_block_engine(result_type __sd) : __e_(__sd), __n_(0) {}
|
|
explicit discard_block_engine(result_type __sd) : __e_(__sd), __n_(0) {}
|
|
- template<class _Sseq> explicit discard_block_engine(_Sseq& __q)
|
|
|
|
|
|
+ template<class _Sseq> explicit discard_block_engine(_Sseq& __q,
|
|
|
|
+ typename enable_if<!is_convertible<_Sseq, result_type>::value &&
|
|
|
|
+ !is_convertible<_Sseq, _Engine>::value>::type* = 0)
|
|
: __e_(__q), __n_(0) {}
|
|
: __e_(__q), __n_(0) {}
|
|
void seed() {__e_.seed(); __n_ = 0;}
|
|
void seed() {__e_.seed(); __n_ = 0;}
|
|
void seed(result_type __sd) {__e_.seed(__sd); __n_ = 0;}
|
|
void seed(result_type __sd) {__e_.seed(__sd); __n_ = 0;}
|
|
- template<class _Sseq> void seed(_Sseq& __q) {__e_.seed(__q); __n_ = 0;}
|
|
|
|
|
|
+ template<class _Sseq>
|
|
|
|
+ typename enable_if
|
|
|
|
+ <
|
|
|
|
+ !is_convertible<_Sseq, result_type>::value,
|
|
|
|
+ void
|
|
|
|
+ >::type
|
|
|
|
+ seed(_Sseq& __q) {__e_.seed(__q); __n_ = 0;}
|
|
|
|
|
|
// generating functions
|
|
// generating functions
|
|
result_type operator()();
|
|
result_type operator()();
|
|
@@ -2855,14 +2870,26 @@ public:
|
|
|
|
|
|
// constructors and seeding functions
|
|
// constructors and seeding functions
|
|
independent_bits_engine() {}
|
|
independent_bits_engine() {}
|
|
-// explicit independent_bits_engine(const _Engine& __e);
|
|
|
|
-// explicit independent_bits_engine(_Engine&& __e);
|
|
|
|
|
|
+ explicit independent_bits_engine(const _Engine& __e)
|
|
|
|
+ : __e_(__e) {}
|
|
|
|
+#ifdef _LIBCPP_MOVE
|
|
|
|
+ explicit independent_bits_engine(_Engine&& __e)
|
|
|
|
+ : __e_(_STD::move(__e)) {}
|
|
|
|
+#endif
|
|
explicit independent_bits_engine(result_type __sd) : __e_(__sd) {}
|
|
explicit independent_bits_engine(result_type __sd) : __e_(__sd) {}
|
|
- template<class _Sseq> explicit independent_bits_engine(_Sseq& __q)
|
|
|
|
|
|
+ template<class _Sseq> explicit independent_bits_engine(_Sseq& __q,
|
|
|
|
+ typename enable_if<!is_convertible<_Sseq, result_type>::value &&
|
|
|
|
+ !is_convertible<_Sseq, _Engine>::value>::type* = 0)
|
|
: __e_(__q) {}
|
|
: __e_(__q) {}
|
|
void seed() {__e_.seed();}
|
|
void seed() {__e_.seed();}
|
|
void seed(result_type __sd) {__e_.seed(__sd);}
|
|
void seed(result_type __sd) {__e_.seed(__sd);}
|
|
- template<class _Sseq> void seed(_Sseq& __q) {__e_.seed(__q);}
|
|
|
|
|
|
+ template<class _Sseq>
|
|
|
|
+ typename enable_if
|
|
|
|
+ <
|
|
|
|
+ !is_convertible<_Sseq, result_type>::value,
|
|
|
|
+ void
|
|
|
|
+ >::type
|
|
|
|
+ seed(_Sseq& __q) {__e_.seed(__q);}
|
|
|
|
|
|
// generating functions
|
|
// generating functions
|
|
result_type operator()() {return __eval(integral_constant<bool, _R != 0>());}
|
|
result_type operator()() {return __eval(integral_constant<bool, _R != 0>());}
|
|
@@ -3051,14 +3078,26 @@ public:
|
|
|
|
|
|
// constructors and seeding functions
|
|
// constructors and seeding functions
|
|
shuffle_order_engine() {__init();}
|
|
shuffle_order_engine() {__init();}
|
|
-// explicit shuffle_order_engine(const _Engine& __e);
|
|
|
|
-// explicit shuffle_order_engine(_Engine&& e);
|
|
|
|
|
|
+ explicit shuffle_order_engine(const _Engine& __e)
|
|
|
|
+ : __e_(__e) {__init();}
|
|
|
|
+#ifdef _LIBCPP_MOVE
|
|
|
|
+ explicit shuffle_order_engine(_Engine&& __e)
|
|
|
|
+ : __e_(_STD::move(__e)) {__init();}
|
|
|
|
+#endif
|
|
explicit shuffle_order_engine(result_type __sd) : __e_(__sd) {__init();}
|
|
explicit shuffle_order_engine(result_type __sd) : __e_(__sd) {__init();}
|
|
- template<class _Sseq> explicit shuffle_order_engine(_Sseq& __q)
|
|
|
|
|
|
+ template<class _Sseq> explicit shuffle_order_engine(_Sseq& __q,
|
|
|
|
+ typename enable_if<!is_convertible<_Sseq, result_type>::value &&
|
|
|
|
+ !is_convertible<_Sseq, _Engine>::value>::type* = 0)
|
|
: __e_(__q) {__init();}
|
|
: __e_(__q) {__init();}
|
|
void seed() {__e_.seed(); __init();}
|
|
void seed() {__e_.seed(); __init();}
|
|
void seed(result_type __sd) {__e_.seed(__sd); __init();}
|
|
void seed(result_type __sd) {__e_.seed(__sd); __init();}
|
|
- template<class _Sseq> void seed(_Sseq& __q) {__e_.seed(__q); __init();}
|
|
|
|
|
|
+ template<class _Sseq>
|
|
|
|
+ typename enable_if
|
|
|
|
+ <
|
|
|
|
+ !is_convertible<_Sseq, result_type>::value,
|
|
|
|
+ void
|
|
|
|
+ >::type
|
|
|
|
+ seed(_Sseq& __q) {__e_.seed(__q); __init();}
|
|
|
|
|
|
// generating functions
|
|
// generating functions
|
|
result_type operator()() {return __eval(integral_constant<bool, _R != 0>());}
|
|
result_type operator()() {return __eval(integral_constant<bool, _R != 0>());}
|