diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2018-02-01 16:36:08 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2018-02-01 16:36:08 +0000 |
commit | 14082fcc429ca34d3e509f52c261f916890afb2f (patch) | |
tree | 6331cc4f1164c17e74486bb7abd036910971e9a3 /libcxx/test/std/experimental/algorithms/alg.random.sample/sample.fail.cpp | |
parent | 57e9f44a8cf12b00799637ccce1dc35bf84f08e5 (diff) | |
download | bcm5719-llvm-14082fcc429ca34d3e509f52c261f916890afb2f.tar.gz bcm5719-llvm-14082fcc429ca34d3e509f52c261f916890afb2f.zip |
Remove std::experimental::sample; use std::sample instead. See https://libcxx.llvm.org/TS_deprecation.html
llvm-svn: 323979
Diffstat (limited to 'libcxx/test/std/experimental/algorithms/alg.random.sample/sample.fail.cpp')
-rw-r--r-- | libcxx/test/std/experimental/algorithms/alg.random.sample/sample.fail.cpp | 41 |
1 files changed, 0 insertions, 41 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 deleted file mode 100644 index 85ff8e15d16..00000000000 --- a/libcxx/test/std/experimental/algorithms/alg.random.sample/sample.fail.cpp +++ /dev/null @@ -1,41 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03 - -// <algorithm> - -// template <class PopulationIterator, class SampleIterator, class Distance, -// class UniformRandomNumberGenerator> -// SampleIterator sample(PopulationIterator first, PopulationIterator last, -// SampleIterator out, Distance n, -// UniformRandomNumberGenerator &&g); - -#include <experimental/algorithm> -#include <random> -#include <cassert> - -#include "test_iterators.h" - -template <class PopulationIterator, class SampleIterator> void test() { - int ia[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; - const unsigned is = sizeof(ia) / sizeof(ia[0]); - const unsigned os = 4; - int oa[os]; - std::minstd_rand g; - std::experimental::sample(PopulationIterator(ia), PopulationIterator(ia + is), - SampleIterator(oa), os, g); -} - -int main() { - // 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 *> >(); -} |