Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

c++17 removed random_shuffle #24010

Closed
Milestone
@hoodmane

Description

@hoodmane

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp