Add experimental::sample and experimental::shuffle from N4531
authorJonathan Wakely <jwakely@redhat.com>
Mon, 25 Jun 2018 16:23:49 +0000 (17:23 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 25 Jun 2018 16:23:49 +0000 (17:23 +0100)
commit37cb7887f8507225f22e053045be851645913f38
tree22c8b8a0a1a4dda2c0b5d43d6b419d143c1071ea
parent10e68fe44f9f1fa25f4fd3afc5d75c4d7503d364
Add experimental::sample and experimental::shuffle from N4531

The additions to <experimental/random> were added in 2015 but the new
algorithms in <experimental/algorithm> were not. This adds them.

* include/experimental/algorithm (sample, shuffle): Add new overloads
using per-thread random number engine.
* testsuite/experimental/algorithm/sample.cc: Simpify and reduce
dependencies by using __gnu_test::test_container.
* testsuite/experimental/algorithm/sample-2.cc: New.
* testsuite/experimental/algorithm/shuffle.cc: New.

From-SVN: r262024
libstdc++-v3/ChangeLog
libstdc++-v3/include/experimental/algorithm
libstdc++-v3/testsuite/experimental/algorithm/sample-2.cc [new file with mode: 0644]
libstdc++-v3/testsuite/experimental/algorithm/sample.cc
libstdc++-v3/testsuite/experimental/algorithm/shuffle.cc [new file with mode: 0644]