diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-08-28 22:14:37 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-08-28 22:14:37 +0000 |
commit | e7154709e02a388db2d8dce91860f2452f4145e0 (patch) | |
tree | d7cd66939217540b5b74d9a8484da38ed3179f42 /libcxx/test/std/experimental/algorithms/alg.random.sample | |
parent | 040411762fde039dcd1a7f513d95d01266bfa94d (diff) | |
download | bcm5719-llvm-e7154709e02a388db2d8dce91860f2452f4145e0.tar.gz bcm5719-llvm-e7154709e02a388db2d8dce91860f2452f4145e0.zip |
Implement C++17 std::sample.
This patch implements the std::sample function added to C++17 from LFTS. It
also removes the std::experimental::sample implementation which now forwards
to std::sample.
llvm-svn: 279948
Diffstat (limited to 'libcxx/test/std/experimental/algorithms/alg.random.sample')
-rw-r--r-- | libcxx/test/std/experimental/algorithms/alg.random.sample/sample.fail.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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 b27135ac7c0..85ff8e15d16 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 @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // <algorithm> // template <class PopulationIterator, class SampleIterator, class Distance, @@ -32,8 +34,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}} + // expected-error@algorithm:* {{static_assert failed "SampleIterator must meet the requirements of RandomAccessIterator"}} + // expected-error@algorithm:* 2 {{does not provide a subscript operator}} + // expected-error@algorithm:* {{invalid operands}} test<input_iterator<int *>, output_iterator<int *> >(); } |