diff --git a/rand/xorshift.cpp b/rand/xorshift.cpp index b99f155b..c7170932 100644 --- a/rand/xorshift.cpp +++ b/rand/xorshift.cpp @@ -28,8 +28,8 @@ template xorshift::xorshift (T seed): m_state (seed) { - // state must not be zero, or the period will be zero. - CHECK_NEZ (m_state); + if (!m_state) + throw std::invalid_argument ("xorshift seed must not be zero"); }