Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Milestone
Description
std::random_shuffle
is used here:
https://github.com/matplotlib/matplotlib/blob/main/src/tri/_tri.cpp#L1469
It has been removed from c++17:
https://en.cppreference.com/w/cpp/algorithm/random_shuffle
The reason for removing std::random_shuffle in C++17 is that the iterator-only version usually depends onstd::rand, which is now also discussed for deprecation. (std::rand should be replaced with the classes of the header, asstd::rand is considered harmful.) In addition, the iterator-only std::random_shuffle version usually depends on a global state. The std::shuffle's shuffle algorithm is the preferred replacement, as it uses a URBG as its 3rd parameter.