*
* See http://www.boost.org for most recent version including documentation.
*
- * $Id: seed.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
+ * $Id: seed.hpp 71018 2011-04-05 21:27:52Z steven_watanabe $
*/
#ifndef BOOST_RANDOM_DETAIL_SEED_HPP
template<class Generator> \
void seed(Generator& gen, typename ::boost::random::detail::disable_seed<Generator>::type* = 0)
+#define BOOST_RANDOM_DETAIL_SEED_SEQ_CONSTRUCTOR(Self, SeedSeq, seq) \
+ template<class SeedSeq> \
+ explicit Self(SeedSeq& seq, typename ::boost::random::detail::disable_constructor<Self, SeedSeq>::type* = 0)
+
+#define BOOST_RANDOM_DETAIL_SEED_SEQ_SEED(Self, SeedSeq, seq) \
+ template<class SeedSeq> \
+ void seed(SeedSeq& seq, typename ::boost::random::detail::disable_seed<SeedSeq>::type* = 0)
+
#define BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR(Self, T, x) \
explicit Self(const T& x)
#define BOOST_RANDOM_DETAIL_ARITHMETIC_SEED(Self, T, x) \
void seed(const T& x)
-
}
}
}
template<class Generator>\
void boost_random_seed_impl(Generator& gen, ::boost::mpl::false_)
+#define BOOST_RANDOM_DETAIL_SEED_SEQ_CONSTRUCTOR(Self, SeedSeq, seq) \
+ Self(Self& other) { *this = other; } \
+ Self(const Self& other) { *this = other; } \
+ template<class SeedSeq> \
+ explicit Self(SeedSeq& seq) { \
+ boost_random_constructor_impl(seq, ::boost::is_arithmetic<SeedSeq>());\
+ } \
+ template<class SeedSeq> \
+ void boost_random_constructor_impl(SeedSeq& seq, ::boost::mpl::false_)
+
+#define BOOST_RANDOM_DETAIL_SEED_SEQ_SEED(Self, SeedSeq, seq) \
+ template<class SeedSeq> \
+ void seed(SeedSeq& seq) { \
+ boost_random_seed_impl(seq, ::boost::is_arithmetic<SeedSeq>()); \
+ } \
+ template<class SeedSeq> \
+ void boost_random_seed_impl(SeedSeq& seq, ::boost::mpl::false_)
+
#define BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR(Self, T, x) \
explicit Self(const T& x) { boost_random_constructor_impl(x, ::boost::mpl::true_()); }\
void boost_random_constructor_impl(const T& x, ::boost::mpl::true_)