Skip to content

Replace the deprecated std::random_shuffle with std::shuffle#513

Open
Becheler wants to merge 1 commit into
boostorg:developfrom
Becheler:fix/deprecated-random-shuffle
Open

Replace the deprecated std::random_shuffle with std::shuffle#513
Becheler wants to merge 1 commit into
boostorg:developfrom
Becheler:fix/deprecated-random-shuffle

Conversation

@Becheler

Copy link
Copy Markdown
Collaborator

clears -Wdeprecated-declarations on both clang and gcc : refer #496

Before submitting

  • This PR targets the develop branch.
  • I searched for an existing PR or issue covering the same change.
  • My contribution is licensed under the Boost Software License 1.0.

Type of change

  • Bug fix
  • New feature or API addition
  • Refactor (no behavior change)
  • Documentation
  • Build, CI, or tooling
  • Other (specify below)

Does this PR introduce a breaking change?

  • Yes (describe migration impact below)
  • No

What this PR does

Replace the deprecated std::random_shuffle (removed in C++17) with std::shuffle (avaiable in C++14)

  • isomorphism.cpp and vf2_sub_graph_iso_test.cpp: dropped the BOOST_NO_CXX98_RANDOM_SHUFFLE guard, now always std::shuffle(..., gen), and removed the now-unused rand_fun.
  • fibonacci_heap.cpp: same guard collapse to std::shuffle(..., gen).

Motivation

Refs #496

Testing

Checklist

  • Existing tests pass (b2 in the test/ directory).
  • New behavior is covered by a test, or this is a docs / build / refactor change.
  • Documentation was updated if user-facing behavior changed.
  • No new compiler warnings on the platforms I built against.

@Becheler Becheler self-assigned this Jun 22, 2026
@Becheler Becheler requested a review from jeremy-murphy as a code owner June 22, 2026 12:27
@github-actions

Copy link
Copy Markdown

Compiler-warning counts vs develop (auto-generated).
PR run 27952604737 vs develop run 27866501982 (29be624016).

Job Baseline After Delta
macos (clang, 14) 46 41 -5
macos (clang, 17) 41 41 0
macos (clang, 20) 41 41 0
ubuntu (clang-19, 14) 46 41 -5
ubuntu (clang-19, 17) 46 41 -5
ubuntu (clang-19, 20) 46 41 -5
ubuntu (clang-19, 23) 46 41 -5
ubuntu (gcc-14, 14) 28 23 -5
ubuntu (gcc-14, 17) 28 23 -5
ubuntu (gcc-14, 20) 28 23 -5
ubuntu (gcc-14, 23) 28 23 -5
windows_msvc_14_3 (msvc-14.3) 974 974 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant