From 040411762fde039dcd1a7f513d95d01266bfa94d Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Sun, 28 Aug 2016 21:55:00 +0000 Subject: 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 --- .../test/std/experimental/algorithms/alg.random.sample/sample.fail.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libcxx/test/std/experimental/algorithms/alg.random.sample/sample.fail.cpp') diff --git a/libcxx/test/std/experimental/algorithms/alg.random.sample/sample.fail.cpp b/libcxx/test/std/experimental/algorithms/alg.random.sample/sample.fail.cpp index eeb43737932..b27135ac7c0 100644 --- a/libcxx/test/std/experimental/algorithms/alg.random.sample/sample.fail.cpp +++ b/libcxx/test/std/experimental/algorithms/alg.random.sample/sample.fail.cpp @@ -32,5 +32,8 @@ template void test() { } int main() { + // expected-error@experimental/algorithm:* {{static_assert failed "SampleIterator must meet the requirements of RandomAccessIterator"}} + // expected-error@experimental/algorithm:* 2 {{does not provide a subscript operator}} + // expected-error@experimental/algorithm:* {{invalid operands}} test, output_iterator >(); } -- cgit v1.2.3