I’m looking to future-proof my program for seeded randomly-generated results, as it’s gonna be ran by different people with different builds and every result needs to be verifiable by any individual. The program needs to generate the same output for previous versions of the software, say, in a year from now on, after me or the community adds a number of features I still need it to repeat what I generate today.
After searching around for a while, I understand that I shouldn’t use the STL in anything that involves random generation, as its implementation may vary. Also my software is multithreaded, so I’m creating a random-generator instance exclusively for each thread like rng(seed + thread index)
.
But I’m suspecting compiling with a flag like -O3
may change the program’s behavior depending what compiler and platform is used as well: Is there an official list of things I might be missing that I’m completely unsuspecting of?
Thanks!