Share this postDaily bit(e) of C++Daily bit(e) of C++ | std::sampleCopy linkFacebookEmailNotesMoreDaily bit(e) of C++ | std::sampleDaily bit(e) of C++ #207, The C++17 stable sampling algorithm: std::sample.Šimon TóthJul 27, 20233Share this postDaily bit(e) of C++Daily bit(e) of C++ | std::sampleCopy linkFacebookEmailNotesMoreShareThe 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).Click to open in Compiler Explorer.Leave a commentThanks for reading Daily bit(e) of C++! Subscribe for free to receive new posts and support my work.Subscribe