If you read the documentation at cppreference.com closely, you will find that the RandomFunc
passed to random_shuffle
has a different interface. It is invoked as r(n)
. This existed before C++11.
std::shuffle
uses a standardized way of getting random numbers and invokes g()
. This standardized random number generators where introduced with C++11 together with std::shuffle
.