I'm also not sure what "hardware" has to do with that guarantee.
One example I can think of where a standard library got this right is Golang:
I'm also not sure what "hardware" has to do with that guarantee.
One example I can think of where a standard library got this right is Golang:
The Boost random library actually does the right thing, and states that boost::random_device must not be implemented where a proper source of random bits is not available. The standard tries to be all things to all people, and std::random_device ends up being useless for any serious application.
As a mathematical random number generation library, the C++ library is much superior to its Go counterpart, math/rand.
The two are not necessarily incompatible. The distributions in the C++ standard library are not married to the standard engines. You can quite straightforwardly write an engine that uses urandom internally and which is compatible with the standard distributions; see the last couple dozen lines of libc++'s random.cpp.
Now, whether there are instances where using a statistical adapter with cryptographically secure random numbers is appropriate is another question, and one which I am not qualified to answer. However, such adapters as std::uniform_int_distribution and std::independent_bits_engine, if it can be verified that they are implemented correctly (and that is admittedly a big "if"), would probably still be useful.