Hot answers tagged

5

It's not clear to me why we need to downgrade from std::random_device to a timestamp-based seed on Intel platforms. If we have good reason to distrust a particular library's implementation, then submit a patch mixing timestamp into the randomness, rather than ignoring the platform's randomness. C++17 was standardised after this code was written; it provides ...


3

Some things to think about: different PRNG algorithms have different trade-offs. The MT19937 algorithm is very fast, but it has a huge internal state (19937 bits to be exact, which is how it got its name). While this is a trivial amount of memory on desktop and server class CPUs, consider that on devices with less (cache) memory, this can be a significant ...


2

I'm going to update to C++20 as we go along, beginning with using modern Standard Library rather than Boost. We need to include some headers: #include <functional> #include <map> #include <memory> #include <queue> EventDispatcher declares a constructor and destructor but never defines them (along with comments that add absolutely ...


Only top voted, non community-wiki answers of a minimum length are eligible