static データメンバの修正

This commit is contained in:
bolero-MURAKAMI 2011-10-10 21:06:34 +09:00
parent 99f1a4f741
commit e6cda7492c
7 changed files with 604 additions and 612 deletions

View file

@ -65,8 +65,7 @@ namespace sprout {
}
public:
SPROUT_CONSTEXPR linear_congruential_engine()
//: x_(init_seed(default_seed)) // ???
: x_(init_seed(1))
: x_(init_seed(default_seed))
{}
SPROUT_CONSTEXPR explicit linear_congruential_engine(IntType const& x0)
: x_(init_seed(x0))
@ -111,6 +110,14 @@ namespace sprout {
return lhs << rhs.x_;
}
};
template<typename IntType, IntType a, IntType c, IntType m>
SPROUT_CONSTEXPR IntType sprout::random::linear_congruential_engine<IntType, a, c, m>::multiplier;
template<typename IntType, IntType a, IntType c, IntType m>
SPROUT_CONSTEXPR IntType sprout::random::linear_congruential_engine<IntType, a, c, m>::increment;
template<typename IntType, IntType a, IntType c, IntType m>
SPROUT_CONSTEXPR IntType sprout::random::linear_congruential_engine<IntType, a, c, m>::modulus;
template<typename IntType, IntType a, IntType c, IntType m>
SPROUT_CONSTEXPR IntType sprout::random::linear_congruential_engine<IntType, a, c, m>::default_seed;
//
// minstd_rand0