From 08e8dd7b9db7bb4a9de26d44c1cbfd24e869c014 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 27 Jul 2022 21:50:45 +0200 Subject: Vendor import of llvm-project main llvmorg-15-init-17826-g1f8ae9d7e7e4, the last commit before the upstream release/16.x branch was created. --- libcxx/include/algorithm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'libcxx/include/algorithm') diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm index 5958ad1a95af..197b3b1043bb 100644 --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -331,6 +331,23 @@ namespace ranges { constexpr borrowed_iterator_t ranges::sort_heap(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 + template S, class Proj = identity, + indirect_strict_weak_order> Comp = ranges::less> + constexpr bool is_heap(I first, S last, Comp comp = {}, Proj proj = {}); // Since C++20 + + template, Proj>> Comp = ranges::less> + constexpr bool is_heap(R&& r, Comp comp = {}, Proj proj = {}); // Since C++20 + + template S, class Proj = identity, + indirect_strict_weak_order> Comp = ranges::less> + constexpr I is_heap_until(I first, S last, Comp comp = {}, Proj proj = {}); // Since C++20 + + template, Proj>> Comp = ranges::less> + constexpr borrowed_iterator_t + is_heap_until(R&& r, Comp comp = {}, Proj proj = {}); // Since C++20 + template S> requires permutable constexpr I ranges::reverse(I first, S last); // since C++20 @@ -380,6 +397,18 @@ namespace ranges { template O> constexpr O ranges::fill_n(O first, iter_difference_t n, const T& value); // since C++20 + template S, copy_constructible F> + requires invocable && indirectly_writable> + constexpr O generate(O first, S last, F gen); // Since C++20 + + template + requires invocable && output_range> + constexpr borrowed_iterator_t generate(R&& r, F gen); // Since C++20 + + template + requires invocable && indirectly_writable> + constexpr O generate_n(O first, iter_difference_t n, F gen); // Since C++20 + template S1, input_iterator I2, sentinel_for S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> requires indirectly_comparable @@ -1575,7 +1604,11 @@ template #include <__algorithm/ranges_find_if_not.h> #include <__algorithm/ranges_for_each.h> #include <__algorithm/ranges_for_each_n.h> +#include <__algorithm/ranges_generate.h> +#include <__algorithm/ranges_generate_n.h> #include <__algorithm/ranges_includes.h> +#include <__algorithm/ranges_is_heap.h> +#include <__algorithm/ranges_is_heap_until.h> #include <__algorithm/ranges_is_partitioned.h> #include <__algorithm/ranges_is_sorted.h> #include <__algorithm/ranges_is_sorted_until.h> -- cgit v1.3