mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Fixed RNG issue with pre C++14 compilers
This commit is contained in:
parent
ac220289a6
commit
1aa6c91e64
@ -37,10 +37,11 @@ namespace Catch {
|
||||
#endif
|
||||
template<typename V>
|
||||
static void shuffle( V& vector ) {
|
||||
RandomNumberGenerator rng;
|
||||
#ifdef CATCH_CPP14_OR_GREATER
|
||||
std::shuffle( vector.begin(), vector.end(), RandomNumberGenerator() );
|
||||
std::shuffle( vector.begin(), vector.end(), rng );
|
||||
#else
|
||||
std::random_shuffle( vector.begin(), vector.end(), RandomNumberGenerator() );
|
||||
std::random_shuffle( vector.begin(), vector.end(), rng );
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user