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.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@279947 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2016-08-28 21:55:00 +00:00
parent 113315b9a4
commit 17c38db650
6 changed files with 19 additions and 13 deletions

View File

@@ -32,5 +32,8 @@ template <class PopulationIterator, class SampleIterator> 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<input_iterator<int *>, output_iterator<int *> >();
}