mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-24 03:32:35 +08:00
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@279948 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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 *> >();
|
||||
}
|
||||
|
Reference in New Issue
Block a user