diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-08-28 21:55:00 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-08-28 21:55:00 +0000 |
commit | 040411762fde039dcd1a7f513d95d01266bfa94d (patch) | |
tree | 338fa1d4c00cf3359ee9a454ba34b53d073ca798 /libcxx/test/std/algorithms | |
parent | 61c0b0c32a0a14003f65c84d3bceec7eb3c10c3d (diff) | |
download | bcm5719-llvm-040411762fde039dcd1a7f513d95d01266bfa94d.tar.gz bcm5719-llvm-040411762fde039dcd1a7f513d95d01266bfa94d.zip |
Mark LWG 2716 as complete - shuffle and sample disallows lvalue URNGs.
Libc++'s implementation of shuffle and sample already support lvalue and rvalue
RNG's. This patch adds tests for both categories and marks the issue as complete.
This patch also contains drive-by change for std::experimental::sample which
improves the diagnostics produced when the correct iterator categories are
not supplied.
llvm-svn: 279947
Diffstat (limited to 'libcxx/test/std/algorithms')
-rw-r--r-- | libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_urng.pass.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_urng.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_urng.pass.cpp index 0c35ed73ee4..512acc392de 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_urng.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_urng.pass.cpp @@ -29,7 +29,7 @@ int main() std::shuffle(ia, ia+sa, g); LIBCPP_ASSERT(std::equal(ia, ia+sa, ia1)); assert(std::is_permutation(ia, ia+sa, ia1)); - std::shuffle(ia, ia+sa, g); + std::shuffle(ia, ia+sa, std::move(g)); LIBCPP_ASSERT(std::equal(ia, ia+sa, ia2)); assert(std::is_permutation(ia, ia+sa, ia2)); } |