diff options
Diffstat (limited to 'libcxx/include/algorithm')
-rw-r--r-- | libcxx/include/algorithm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm index 0a4077837a99..15ba340aa766 100644 --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -758,6 +758,18 @@ namespace ranges { constexpr ranges::rotate_copy_result<borrowed_iterator_t<R>, O> ranges::rotate_copy(R&& r, iterator_t<R> middle, O result); // since C++20 + template<input_iterator I, sentinel_for<I> S, weakly_incrementable O, class Gen> + requires (forward_iterator<I> || random_access_iterator<O>) && + indirectly_copyable<I, O> && + uniform_random_bit_generator<remove_reference_t<Gen>> + O sample(I first, S last, O out, iter_difference_t<I> n, Gen&& g); // Since C++20 + + template<input_range R, weakly_incrementable O, class Gen> + requires (forward_range<R> || random_access_iterator<O>) && + indirectly_copyable<iterator_t<R>, O> && + uniform_random_bit_generator<remove_reference_t<Gen>> + O sample(R&& r, O out, range_difference_t<R> n, Gen&& g); // Since C++20 + template<random_access_iterator I, sentinel_for<I> S, class Gen> requires permutable<I> && uniform_random_bit_generator<remove_reference_t<Gen>> @@ -1773,6 +1785,7 @@ template <class BidirectionalIterator, class Compare> #include <__algorithm/ranges_reverse.h> #include <__algorithm/ranges_reverse_copy.h> #include <__algorithm/ranges_rotate_copy.h> +#include <__algorithm/ranges_sample.h> #include <__algorithm/ranges_search.h> #include <__algorithm/ranges_search_n.h> #include <__algorithm/ranges_set_difference.h> |