Skip to content

Replace random_shuffle with std::shuffle for C++17#24

Open
OldCrow wants to merge 1 commit intoKorfLab:masterfrom
OldCrow:fix/cpp17-shuffle-compat
Open

Replace random_shuffle with std::shuffle for C++17#24
OldCrow wants to merge 1 commit intoKorfLab:masterfrom
OldCrow:fix/cpp17-shuffle-compat

Conversation

@OldCrow
Copy link
Copy Markdown

@OldCrow OldCrow commented Apr 24, 2026

Summary

  • Replace deprecated std::random_shuffle calls in sequence::shuffle() with std::shuffle
  • Add <random> include and use a thread-local std::mt19937 engine
  • Update the sequence.h comment to reflect the new API

Why

std::random_shuffle was removed in C++17. This change restores compatibility with modern compilers while keeping sequence-shuffle behavior in one place.

Co-Authored-By: Oz oz-agent@warp.dev

Use std::shuffle with a thread-local mt19937 engine in sequence::shuffle to preserve shuffle behavior with modern C++ standards.

Co-Authored-By: Oz <oz-agent@warp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant