diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-01-03 20:19:29 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-01-03 20:19:29 +0100 |
commit | 0f9b9483ae215e9ba1714b634903d4b22ec00c58 (patch) | |
tree | 921396e0c64e37ea054de459e473a0c25c28e546 | |
parent | c6b6313f81949bea48d03e4d53ec2da53f6a9460 (diff) |
Force use of the same random number engine acros all compilers/platforms.
-rw-r--r-- | src/random.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/random.h b/src/random.h index c7fd599..a18f5b6 100644 --- a/src/random.h +++ b/src/random.h @@ -52,7 +52,10 @@ public: T& choose(std::vector<T>& vec); private: - std::default_random_engine generator; + // The std::default_random_engine of the gcc libstdc++ library is + // minstd_rand0, so make sure we use that all platforms regardless of which + // stdlib we link with. + std::minstd_rand0 generator; }; template <typename T> |