Will std::mt19937 (Mersenne Twister) return the same sequence of numbers?
Will std::mt19937 (Mersenne Twister) return the same sequence of numbers regardless of platform if given the same seed?
I'm thinking the answer is yes, just wanting to confirm?
Thread #616754. Printed from Allegro.cc
In theory it should work the same on all platforms that stick to the standard. That is why C++11 included the new random header file.
In the past rand() was not properly documented in the specification so there were no guarantees of replication even between same compiler versions. It is still that way though
As long as you use only standard C++11 random facilities you should be safe, don't use rand().