Closed ph4r05 closed 3 years ago
@imneme updated according to the discussion in #67.
As we figured out, bug I was experiencing was caused by non-compliant SeedSeq. The one we are using is non-reentrant, thus generates different values for each call.
This PR addresses issue #67. tldr: clang and gcc generates different streams when seeded from another generator on different platforms.
This is PoC, I am not a template expert in C++, there is probably a nicer way to implement this. e.g., I have a redundant parameter
unused
in the newly added constructorso it is correctly selected when needed as I had a conflict with
https://github.com/imneme/pcg-cpp/blob/5b5cac8d61339e810c5dbb4692d868a1d7ca1b2d/include/pcg_random.hpp#L484
This PR uses GNU GCC evaluation order. Thus after merging this PR the stream generates the same result as it generates with GNU GCC.