Daily bit(e) of C++ | std::sample
Daily bit(e) of C++ #207, The C++17 stable sampling algorithm: std::sample.
The std::sample algorithm (C++17) is a stable (maintains relative order of elements) sampling algorithm that randomly copies the specified number of elements from the source range into the destination range (output iterator).