diff options
author | Mark de Wever <koraq@xs4all.nl> | 2023-02-24 21:35:41 +0100 |
---|---|---|
committer | Mark de Wever <koraq@xs4all.nl> | 2023-02-27 19:24:06 +0100 |
commit | de6827b530d8b6fd85e6714af80eca3107c91ea2 (patch) | |
tree | 8cd59d96142a353f683139286650eb38465da08d /libcxx/include/algorithm | |
parent | f41f392520935ff78f211f48240c46d6c715fd13 (diff) | |
download | llvm-de6827b530d8b6fd85e6714af80eca3107c91ea2.zip llvm-de6827b530d8b6fd85e6714af80eca3107c91ea2.tar.gz llvm-de6827b530d8b6fd85e6714af80eca3107c91ea2.tar.bz2 |
[libc++] Improves clang-format settings.
Add a new test based .clang-format file which inherits from the generic
one. This moves some test specific formatting rules to the test
directory.
The main benefit is that headers are sorted, which makes it more likely
to catch these errors before creating a review instead of spotting the
error in the CI clang-tidy step.
Reviewed By: ldionne, philnik, #libc
Differential Revision: https://reviews.llvm.org/D144755
Diffstat (limited to 'libcxx/include/algorithm')
-rw-r--r-- | libcxx/include/algorithm | 222 |
1 files changed, 111 insertions, 111 deletions
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm index 21d177c..75ba4b2 100644 --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -22,41 +22,41 @@ namespace ranges { // [algorithms.results], algorithm result types template <class I, class F> - struct in_fun_result; // since C++20 + struct in_fun_result; // since C++20 template <class I1, class I2> - struct in_in_result; // since C++20 + struct in_in_result; // since C++20 template <class I, class O> - struct in_out_result; // since C++20 + struct in_out_result; // since C++20 template <class I1, class I2, class O> - struct in_in_out_result; // since C++20 + struct in_in_out_result; // since C++20 template <class I, class O1, class O2> - struct in_out_out_result; // since C++20 + struct in_out_out_result; // since C++20 template <class I1, class I2> - struct min_max_result; // since C++20 + struct min_max_result; // since C++20 template <class I> - struct in_found_result; // since C++20 + struct in_found_result; // since C++20 template<forward_iterator I, sentinel_for<I> S, class Proj = identity, - indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less> // since C++20 + indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less> // since C++20 constexpr I min_element(I first, S last, Comp comp = {}, Proj proj = {}); template<forward_range R, class Proj = identity, - indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less> // since C++20 + indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less> // since C++20 constexpr borrowed_iterator_t<R> min_element(R&& r, Comp comp = {}, Proj proj = {}); template<forward_iterator I, sentinel_for<I> S, class Proj = identity, indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less> - constexpr I ranges::max_element(I first, S last, Comp comp = {}, Proj proj = {}); // since C++20 + constexpr I ranges::max_element(I first, S last, Comp comp = {}, Proj proj = {}); // since C++20 template<forward_range R, class Proj = identity, indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less> - constexpr borrowed_iterator_t<R> ranges::max_element(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 + constexpr borrowed_iterator_t<R> ranges::max_element(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 template<class I1, class I2> using mismatch_result = in_in_result<I1, I2>; @@ -64,86 +64,86 @@ namespace ranges { template <input_iterator I1, sentinel_for<_I1> S1, input_iterator I2, sentinel_for<_I2> S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> requires indirectly_comparable<I1, I2, Pred, Proj1, Proj2> - constexpr mismatch_result<_I1, _I2> - mismatch()(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}) // since C++20 + constexpr mismatch_result<_I1, _I2> // since C++20 + mismatch()(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}) template <input_range R1, input_range R2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> requires indirectly_comparable<iterator_t<R1>, iterator_t<R2>, Pred, Proj1, Proj2> constexpr mismatch_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>> - mismatch(R1&& r1, R2&& r2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}) // since C++20 + mismatch(R1&& r1, R2&& r2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}) // since C++20 requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*> - constexpr I find(I first, S last, const T& value, Proj proj = {}); // since C++20 + constexpr I find(I first, S last, const T& value, Proj proj = {}); // since C++20 template<input_range R, class T, class Proj = identity> requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*> constexpr borrowed_iterator_t<R> - find(R&& r, const T& value, Proj proj = {}); // since C++20 + find(R&& r, const T& value, Proj proj = {}); // since C++20 template<input_iterator I, sentinel_for<I> S, class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred> - constexpr I find_if(I first, S last, Pred pred, Proj proj = {}); // since C++20 + constexpr I find_if(I first, S last, Pred pred, Proj proj = {}); // since C++20 template<input_range R, class Proj = identity, indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred> constexpr borrowed_iterator_t<R> - find_if(R&& r, Pred pred, Proj proj = {}); // since C++20 + find_if(R&& r, Pred pred, Proj proj = {}); // since C++20 template<input_iterator I, sentinel_for<I> S, class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred> - constexpr I find_if_not(I first, S last, Pred pred, Proj proj = {}); // since C++20 + constexpr I find_if_not(I first, S last, Pred pred, Proj proj = {}); // since C++20 template<input_range R, class Proj = identity, indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred> constexpr borrowed_iterator_t<R> - find_if_not(R&& r, Pred pred, Proj proj = {}); // since C++20 + find_if_not(R&& r, Pred pred, Proj proj = {}); // since C++20 template<class T, class Proj = identity, indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less> - constexpr const T& min(const T& a, const T& b, Comp comp = {}, Proj proj = {}); // since C++20 + constexpr const T& min(const T& a, const T& b, Comp comp = {}, Proj proj = {}); // since C++20 template<copyable T, class Proj = identity, indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less> - constexpr T min(initializer_list<T> r, Comp comp = {}, Proj proj = {}); // since C++20 + constexpr T min(initializer_list<T> r, Comp comp = {}, Proj proj = {}); // since C++20 template<input_range R, class Proj = identity, indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less> requires indirectly_copyable_storable<iterator_t<R>, range_value_t<R>*> constexpr range_value_t<R> - min(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 + min(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 template<class T, class Proj = identity, indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less> - constexpr const T& max(const T& a, const T& b, Comp comp = {}, Proj proj = {}); // since C++20 + constexpr const T& max(const T& a, const T& b, Comp comp = {}, Proj proj = {}); // since C++20 template<copyable T, class Proj = identity, indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less> - constexpr T max(initializer_list<T> r, Comp comp = {}, Proj proj = {}); // since C++20 + constexpr T max(initializer_list<T> r, Comp comp = {}, Proj proj = {}); // since C++20 template<input_range R, class Proj = identity, indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less> requires indirectly_copyable_storable<iterator_t<R>, range_value_t<R>*> constexpr range_value_t<R> - max(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 + max(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 template<class I, class O> - using unary_transform_result = in_out_result<I, O>; // since C++20 + using unary_transform_result = in_out_result<I, O>; // since C++20 template<class I1, class I2, class O> - using binary_transform_result = in_in_out_result<I1, I2, O>; // since C++20 + using binary_transform_result = in_in_out_result<I1, I2, O>; // since C++20 template<input_iterator I, sentinel_for<I> S, weakly_incrementable O, copy_constructible F, class Proj = identity> requires indirectly_writable<O, indirect_result_t<F&, projected<I, Proj>>> constexpr ranges::unary_transform_result<I, O> - transform(I first1, S last1, O result, F op, Proj proj = {}); // since C++20 + transform(I first1, S last1, O result, F op, Proj proj = {}); // since C++20 template<input_range R, weakly_incrementable O, copy_constructible F, class Proj = identity> requires indirectly_writable<O, indirect_result_t<F&, projected<iterator_t<R>, Proj>>> constexpr ranges::unary_transform_result<borrowed_iterator_t<R>, O> - transform(R&& r, O result, F op, Proj proj = {}); // since C++20 + transform(R&& r, O result, F op, Proj proj = {}); // since C++20 template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2, weakly_incrementable O, copy_constructible F, class Proj1 = identity, @@ -152,7 +152,7 @@ namespace ranges { projected<I2, Proj2>>> constexpr ranges::binary_transform_result<I1, I2, O> transform(I1 first1, S1 last1, I2 first2, S2 last2, O result, - F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++20 + F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++20 template<input_range R1, input_range R2, weakly_incrementable O, copy_constructible F, class Proj1 = identity, class Proj2 = identity> @@ -160,27 +160,27 @@ namespace ranges { projected<iterator_t<R2>, Proj2>>> constexpr ranges::binary_transform_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>, O> transform(R1&& r1, R2&& r2, O result, - F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++20 + F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++20 template<input_iterator I, sentinel_for<I> S, class T, class Proj = identity> requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*> constexpr iter_difference_t<I> - count(I first, S last, const T& value, Proj proj = {}); // since C++20 + count(I first, S last, const T& value, Proj proj = {}); // since C++20 template<input_range R, class T, class Proj = identity> requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*> constexpr range_difference_t<R> - count(R&& r, const T& value, Proj proj = {}); // since C++20 + count(R&& r, const T& value, Proj proj = {}); // since C++20 template<input_iterator I, sentinel_for<I> S, class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred> constexpr iter_difference_t<I> - count_if(I first, S last, Pred pred, Proj proj = {}); // since C++20 + count_if(I first, S last, Pred pred, Proj proj = {}); // since C++20 template<input_range R, class Proj = identity, indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred> constexpr range_difference_t<R> - count_if(R&& r, Pred pred, Proj proj = {}); // since C++20 + count_if(R&& r, Pred pred, Proj proj = {}); // since C++20 template<class T> using minmax_result = min_max_result<T>; @@ -188,18 +188,18 @@ namespace ranges { template<class T, class Proj = identity, indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less> constexpr ranges::minmax_result<const T&> - minmax(const T& a, const T& b, Comp comp = {}, Proj proj = {}); // since C++20 + minmax(const T& a, const T& b, Comp comp = {}, Proj proj = {}); // since C++20 template<copyable T, class Proj = identity, indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less> constexpr ranges::minmax_result<T> - minmax(initializer_list<T> r, Comp comp = {}, Proj proj = {}); // since C++20 + minmax(initializer_list<T> r, Comp comp = {}, Proj proj = {}); // since C++20 template<input_range R, class Proj = identity, indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less> requires indirectly_copyable_storable<iterator_t<R>, range_value_t<R>*> constexpr ranges::minmax_result<range_value_t<R>> - minmax(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 + minmax(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 template<class I> using minmax_element_result = min_max_result<I>; @@ -207,18 +207,18 @@ namespace ranges { template<forward_iterator I, sentinel_for<I> S, class Proj = identity, indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less> constexpr ranges::minmax_element_result<I> - minmax_element(I first, S last, Comp comp = {}, Proj proj = {}); // since C++20 + minmax_element(I first, S last, Comp comp = {}, Proj proj = {}); // since C++20 template<forward_range R, class Proj = identity, indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less> constexpr ranges::minmax_element_result<borrowed_iterator_t<R>> - minmax_element(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 + minmax_element(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 template<class I, class O> - using copy_result = in_out_result<I, O>; // since C++20 + using copy_result = in_out_result<I, O>; // since C++20 template<class I, class O> - using copy_n_result = in_out_result<I, O>; // since C++20 + using copy_n_result = in_out_result<I, O>; // since C++20 template<class I, class O> using copy_if_result = in_out_result<I, O>; // since C++20 @@ -333,20 +333,20 @@ namespace ranges { template<random_access_iterator I, sentinel_for<I> S, class Proj = identity, indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less> - constexpr bool is_heap(I first, S last, Comp comp = {}, Proj proj = {}); // Since C++20 + constexpr bool is_heap(I first, S last, Comp comp = {}, Proj proj = {}); // since C++20 template<random_access_range R, class Proj = identity, indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less> - constexpr bool is_heap(R&& r, Comp comp = {}, Proj proj = {}); // Since C++20 + constexpr bool is_heap(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 template<random_access_iterator I, sentinel_for<I> S, class Proj = identity, indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less> - constexpr I is_heap_until(I first, S last, Comp comp = {}, Proj proj = {}); // Since C++20 + constexpr I is_heap_until(I first, S last, Comp comp = {}, Proj proj = {}); // since C++20 template<random_access_range R, class Proj = identity, indirect_strict_weak_order<projected<iterator_t<R>, Proj>> Comp = ranges::less> constexpr borrowed_iterator_t<R> - is_heap_until(R&& r, Comp comp = {}, Proj proj = {}); // Since C++20 + is_heap_until(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 template<bidirectional_iterator I, sentinel_for<I> S> requires permutable<I> @@ -399,15 +399,15 @@ namespace ranges { template<input_or_output_iterator O, sentinel_for<O> S, copy_constructible F> requires invocable<F&> && indirectly_writable<O, invoke_result_t<F&>> - constexpr O generate(O first, S last, F gen); // Since C++20 + constexpr O generate(O first, S last, F gen); // since C++20 template<class R, copy_constructible F> requires invocable<F&> && output_range<R, invoke_result_t<F&>> - constexpr borrowed_iterator_t<R> generate(R&& r, F gen); // Since C++20 + constexpr borrowed_iterator_t<R> generate(R&& r, F gen); // since C++20 template<input_or_output_iterator O, copy_constructible F> requires invocable<F&> && indirectly_writable<O, invoke_result_t<F&>> - constexpr O generate_n(O first, iter_difference_t<O> n, F gen); // Since C++20 + constexpr O generate_n(O first, iter_difference_t<O> n, F gen); // since C++20 template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> @@ -424,27 +424,27 @@ namespace ranges { template<input_iterator I, sentinel_for<I> S, class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred> - constexpr bool ranges::all_of(I first, S last, Pred pred, Proj proj = {}); // since C++20 + constexpr bool ranges::all_of(I first, S last, Pred pred, Proj proj = {}); // since C++20 template<input_range R, class Proj = identity, indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred> - constexpr bool ranges::all_of(R&& r, Pred pred, Proj proj = {}); // since C++20 + constexpr bool ranges::all_of(R&& r, Pred pred, Proj proj = {}); // since C++20 template<input_iterator I, sentinel_for<I> S, class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred> - constexpr bool ranges::any_of(I first, S last, Pred pred, Proj proj = {}); // since C++20 + constexpr bool ranges::any_of(I first, S last, Pred pred, Proj proj = {}); // since C++20 template<input_range R, class Proj = identity, indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred> - constexpr bool ranges::any_of(R&& r, Pred pred, Proj proj = {}); // since C++20 + constexpr bool ranges::any_of(R&& r, Pred pred, Proj proj = {}); // since C++20 template<input_iterator I, sentinel_for<I> S, class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred> - constexpr bool ranges::none_of(I first, S last, Pred pred, Proj proj = {}); // since C++20 + constexpr bool ranges::none_of(I first, S last, Pred pred, Proj proj = {}); // since C++20 template<input_range R, class Proj = identity, indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred> - constexpr bool ranges::none_of(R&& r, Pred pred, Proj proj = {}); // since C++20 + constexpr bool ranges::none_of(R&& r, Pred pred, Proj proj = {}); // since C++20 template<input_iterator I1, sentinel_for<I1> S1, random_access_iterator I2, sentinel_for<I2> S2, @@ -453,7 +453,7 @@ namespace ranges { indirect_strict_weak_order<Comp, projected<I1, Proj1>, projected<I2, Proj2>> constexpr partial_sort_copy_result<I1, I2> partial_sort_copy(I1 first, S1 last, I2 result_first, S2 result_last, - Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); // Since C++20 + Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++20 template<input_range R1, random_access_range R2, class Comp = ranges::less, class Proj1 = identity, class Proj2 = identity> @@ -463,7 +463,7 @@ namespace ranges { projected<iterator_t<R2>, Proj2>> constexpr partial_sort_copy_result<borrowed_iterator_t<R1>, borrowed_iterator_t<R2>> partial_sort_copy(R1&& r, R2&& result_r, Comp comp = {}, - Proj1 proj1 = {}, Proj2 proj2 = {}); // Since C++20 + Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++20 template<forward_iterator I, sentinel_for<I> S, class Proj = identity, indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less> @@ -486,64 +486,64 @@ namespace ranges { class Proj = identity> requires sortable<I, Comp, Proj> constexpr I - ranges::nth_element(I first, I nth, S last, Comp comp = {}, Proj proj = {}); // since C++20 + ranges::nth_element(I first, I nth, S last, Comp comp = {}, Proj proj = {}); // since C++20 template<random_access_range R, class Comp = ranges::less, class Proj = identity> requires sortable<iterator_t<R>, Comp, Proj> constexpr borrowed_iterator_t<R> - ranges::nth_element(R&& r, iterator_t<R> nth, Comp comp = {}, Proj proj = {}); // since C++20 + ranges::nth_element(R&& r, iterator_t<R> nth, Comp comp = {}, Proj proj = {}); // since C++20 template<forward_iterator I, sentinel_for<I> S, class T, class Proj = identity, - indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less> - constexpr I upper_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); // since C++20 + indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less> // since C++20 + constexpr I upper_bound(I first, S last, const T& value, Comp comp = {}, Proj proj = {}); template<forward_range R, class T, class Proj = identity, indirect_strict_weak_order<const T*, projected<iterator_t<R>, Proj>> Comp = ranges::less> constexpr borrowed_iterator_t<R> - upper_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {}); // since C++20 + upper_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {}); // since C++20 template<forward_iterator I, sentinel_for<I> S, class T, class Proj = identity, indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less> constexpr I lower_bound(I first, S last, const T& value, Comp comp = {}, - Proj proj = {}); // since C++20 + Proj proj = {}); // since C++20 template<forward_range R, class T, class Proj = identity, indirect_strict_weak_order<const T*, projected<iterator_t<R>, Proj>> Comp = ranges::less> constexpr borrowed_iterator_t<R> - lower_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {}); // since C++20 + lower_bound(R&& r, const T& value, Comp comp = {}, Proj proj = {}); // since C++20 template<forward_iterator I, sentinel_for<I> S, class T, class Proj = identity, indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less> constexpr bool binary_search(I first, S last, const T& value, Comp comp = {}, - Proj proj = {}); // since C++20 + Proj proj = {}); // since C++20 template<forward_range R, class T, class Proj = identity, indirect_strict_weak_order<const T*, projected<iterator_t<R>, Proj>> Comp = ranges::less> constexpr bool binary_search(R&& r, const T& value, Comp comp = {}, - Proj proj = {}); // since C++20 + Proj proj = {}); // since C++20 template<permutable I, sentinel_for<I> S, class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred> constexpr subrange<I> - partition(I first, S last, Pred pred, Proj proj = {}); // Since C++20 + partition(I first, S last, Pred pred, Proj proj = {}); // since C++20 template<forward_range R, class Proj = identity, indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred> requires permutable<iterator_t<R>> constexpr borrowed_subrange_t<R> - partition(R&& r, Pred pred, Proj proj = {}); // Since C++20 + partition(R&& r, Pred pred, Proj proj = {}); // since C++20 template<bidirectional_iterator I, sentinel_for<I> S, class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred> requires permutable<I> - subrange<I> stable_partition(I first, S last, Pred pred, Proj proj = {}); // Since C++20 + subrange<I> stable_partition(I first, S last, Pred pred, Proj proj = {}); // since C++20 template<bidirectional_range R, class Proj = identity, indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred> requires permutable<iterator_t<R>> - borrowed_subrange_t<R> stable_partition(R&& r, Pred pred, Proj proj = {}); // Since C++20 + borrowed_subrange_t<R> stable_partition(R&& r, Pred pred, Proj proj = {}); // since C++20 template<input_iterator I1, sentinel_for<I1> S1, forward_iterator I2, sentinel_for<I2> S2, class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity> @@ -563,7 +563,7 @@ namespace ranges { template<forward_iterator I, sentinel_for<I> S, class Proj = identity, indirect_binary_predicate<projected<I, Proj>, projected<I, Proj>> Pred = ranges::equal_to> - constexpr I ranges::adjacent_find(I first, S last, Pred pred = {}, Proj proj = {}); // since C+20 + constexpr I ranges::adjacent_find(I first, S last, Pred pred = {}, Proj proj = {}); // since C++20 template<forward_range R, class Proj = identity, indirect_binary_predicate<projected<iterator_t<R>, Proj>, @@ -604,7 +604,7 @@ namespace ranges { projected<I2, Proj2>> Comp = ranges::less> constexpr bool ranges::lexicographical_compare(I1 first1, S1 last1, I2 first2, S2 last2, - Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++20 + Comp comp = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++20 template<input_range R1, input_range R2, class Proj1 = identity, class Proj2 = identity, @@ -612,7 +612,7 @@ namespace ranges { projected<iterator_t<R2>, Proj2>> Comp = ranges::less> constexpr bool ranges::lexicographical_compare(R1&& r1, R2&& r2, Comp comp = {}, - Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++20 + Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++20 template<bidirectional_iterator I1, sentinel_for<I1> S1, bidirectional_iterator I2> requires indirectly_movable<I1, I2> @@ -643,7 +643,7 @@ namespace ranges { requires indirectly_copyable<I, O1> && indirectly_copyable<I, O2> constexpr partition_copy_result<I, O1, O2> partition_copy(I first, S last, O1 out_true, O2 out_false, Pred pred, - Proj proj = {}); // Since C++20 + Proj proj = {}); // since C++20 template<input_range R, weakly_incrementable O1, weakly_incrementable O2, class Proj = identity, @@ -651,16 +651,16 @@ namespace ranges { requires indirectly_copyable<iterator_t<R>, O1> && indirectly_copyable<iterator_t<R>, O2> constexpr partition_copy_result<borrowed_iterator_t<R>, O1, O2> - partition_copy(R&& r, O1 out_true, O2 out_false, Pred pred, Proj proj = {}); // Since C++20 + partition_copy(R&& r, O1 out_true, O2 out_false, Pred pred, Proj proj = {}); // since C++20 template<forward_iterator I, sentinel_for<I> S, class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred> - constexpr I partition_point(I first, S last, Pred pred, Proj proj = {}); // Since C++20 + constexpr I partition_point(I first, S last, Pred pred, Proj proj = {}); // since C++20 template<forward_range R, class Proj = identity, indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred> constexpr borrowed_iterator_t<R> - partition_point(R&& r, Pred pred, Proj proj = {}); // Since C++20 + partition_point(R&& r, Pred pred, Proj proj = {}); // since C++20 template<class I1, class I2, class O> using merge_result = in_in_out_result<I1, I2, O>; // since C++20 @@ -755,7 +755,7 @@ namespace ranges { template<forward_range R> requires permutable<iterator_t<R>> - constexpr borrowed_subrange_t<R> rotate(R&& r, iterator_t<R> middle); // Since C++20 + constexpr borrowed_subrange_t<R> rotate(R&& r, iterator_t<R> middle); // since C++20 template <class _InIter, class _OutIter> using rotate_copy_result = in_out_result<_InIter, _OutIter>; // since C++20 @@ -774,23 +774,23 @@ namespace ranges { 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 + 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 + 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>> - I shuffle(I first, S last, Gen&& g); // Since C++20 + I shuffle(I first, S last, Gen&& g); // since C++20 template<random_access_range R, class Gen> requires permutable<iterator_t<R>> && uniform_random_bit_generator<remove_reference_t<Gen>> - borrowed_iterator_t<R> shuffle(R&& r, Gen&& g); // Since C++20 + borrowed_iterator_t<R> shuffle(R&& r, Gen&& g); // since C++20 template<forward_iterator I1, sentinel_for<I1> S1, forward_iterator I2, sentinel_for<I2> S2, class Proj1 = identity, class Proj2 = identity, @@ -798,14 +798,14 @@ namespace ranges { projected<I2, Proj2>> Pred = ranges::equal_to> constexpr bool ranges::is_permutation(I1 first1, S1 last1, I2 first2, S2 last2, Pred pred = {}, - Proj1 proj1 = {}, Proj2 proj2 = {}); // Since C++20 + Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++20 template<forward_range R1, forward_range R2, class Proj1 = identity, class Proj2 = identity, indirect_equivalence_relation<projected<iterator_t<R1>, Proj1>, projected<iterator_t<R2>, Proj2>> Pred = ranges::equal_to> constexpr bool ranges::is_permutation(R1&& r1, R2&& r2, Pred pred = {}, - Proj1 proj1 = {}, Proj2 proj2 = {}); // Since C++20 + Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++20 template<forward_iterator I1, sentinel_for<I1> S1, forward_iterator I2, sentinel_for<I2> S2, class Pred = ranges::equal_to, @@ -904,35 +904,35 @@ namespace ranges { indirect_strict_weak_order<projected<I1, Proj1>, projected<I2, Proj2>> Comp = ranges::less> constexpr bool includes(I1 first1, S1 last1, I2 first2, S2 last2, Comp comp = {}, - Proj1 proj1 = {}, Proj2 proj2 = {}); // Since C++20 + Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++20 template<input_range R1, input_range R2, class Proj1 = identity, class Proj2 = identity, indirect_strict_weak_order<projected<iterator_t<R1>, Proj1>, projected<iterator_t<R2>, Proj2>> Comp = ranges::less> constexpr bool includes(R1&& r1, R2&& r2, Comp comp = {}, - Proj1 proj1 = {}, Proj2 proj2 = {}); // Since C++20 + Proj1 proj1 = {}, Proj2 proj2 = {}); // since C++20 template<bidirectional_iterator I, sentinel_for<I> S, class Comp = ranges::less, class Proj = identity> requires sortable<I, Comp, Proj> - I inplace_merge(I first, I middle, S last, Comp comp = {}, Proj proj = {}); // Since C++20 + I inplace_merge(I first, I middle, S last, Comp comp = {}, Proj proj = {}); // since C++20 template<bidirectional_range R, class Comp = ranges::less, class Proj = identity> requires sortable<iterator_t<R>, Comp, Proj> borrowed_iterator_t<R> inplace_merge(R&& r, iterator_t<R> middle, Comp comp = {}, - Proj proj = {}); // Since C++20 + Proj proj = {}); // since C++20 template<permutable I, sentinel_for<I> S, class Proj = identity, indirect_equivalence_relation<projected<I, Proj>> C = ranges::equal_to> - constexpr subrange<I> unique(I first, S last, C comp = {}, Proj proj = {}); // Since C++20 + constexpr subrange<I> unique(I first, S last, C comp = {}, Proj proj = {}); // since C++20 template<forward_range R, class Proj = identity, indirect_equivalence_relation<projected<iterator_t<R>, Proj>> C = ranges::equal_to> requires permutable<iterator_t<R>> constexpr borrowed_subrange_t<R> - unique(R&& r, C comp = {}, Proj proj = {}); // Since C++20 + unique(R&& r, C comp = {}, Proj proj = {}); // since C++20 template<input_iterator I, sentinel_for<I> S, weakly_incrementable O, class Proj = identity, indirect_equivalence_relation<projected<I, Proj>> C = ranges::equal_to> @@ -941,7 +941,7 @@ namespace ranges { (input_iterator<O> && same_as<iter_value_t<I>, iter_value_t<O>>) || indirectly_copyable_storable<I, O>) constexpr unique_copy_result<I, O> - unique_copy(I first, S last, O result, C comp = {}, Proj proj = {}); // Since C++20 + unique_copy(I first, S last, O result, C comp = {}, Proj proj = {}); // since C++20 template<input_range R, weakly_incrementable O, class Proj = identity, indirect_equivalence_relation<projected<iterator_t<R>, Proj>> C = ranges::equal_to> @@ -950,41 +950,41 @@ namespace ranges { (input_iterator<O> && same_as<range_value_t<R>, iter_value_t<O>>) || indirectly_copyable_storable<iterator_t<R>, O>) constexpr unique_copy_result<borrowed_iterator_t<R>, O> - unique_copy(R&& r, O result, C comp = {}, Proj proj = {}); // Since C++20 + unique_copy(R&& r, O result, C comp = {}, Proj proj = {}); // since C++20 template<class I, class O> - using remove_copy_result = in_out_result<I, O>; // Since C++20 + using remove_copy_result = in_out_result<I, O>; // since C++20 template<input_iterator I, sentinel_for<I> S, weakly_incrementable O, class T, class Proj = identity> indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*> constexpr remove_copy_result<I, O> - remove_copy(I first, S last, O result, const T& value, Proj proj = {}); // Since C++20 + remove_copy(I first, S last, O result, const T& value, Proj proj = {}); // since C++20 template<input_range R, weakly_incrementable O, class T, class Proj = identity> requires indirectly_copyable<iterator_t<R>, O> && indirect_binary_predicate<ranges::equal_to, projected<iterator_t<R>, Proj>, const T*> constexpr remove_copy_result<borrowed_iterator_t<R>, O> - remove_copy(R&& r, O result, const T& value, Proj proj = {}); // Since C++20 + remove_copy(R&& r, O result, const T& value, Proj proj = {}); // since C++20 template<class I, class O> - using remove_copy_if_result = in_out_result<I, O>; // Since C++20 + using remove_copy_if_result = in_out_result<I, O>; // since C++20 template<input_iterator I, sentinel_for<I> S, weakly_incrementable O, class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred> requires indirectly_copyable<I, O> constexpr remove_copy_if_result<I, O> - remove_copy_if(I first, S last, O result, Pred pred, Proj proj = {}); // Since C++20 + remove_copy_if(I first, S last, O result, Pred pred, Proj proj = {}); // since C++20 template<input_range R, weakly_incrementable O, class Proj = identity, indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred> requires indirectly_copyable<iterator_t<R>, O> constexpr remove_copy_if_result<borrowed_iterator_t<R>, O> - remove_copy_if(R&& r, O result, Pred pred, Proj proj = {}); // Since C++20 + remove_copy_if(R&& r, O result, Pred pred, Proj proj = {}); // since C++20 template<class I, class O> - using replace_copy_result = in_out_result<I, O>; // Since C++20 + using replace_copy_result = in_out_result<I, O>; // since C++20 template<input_iterator I, sentinel_for<I> S, class T1, class T2, output_iterator<const T2&> O, class Proj = identity> @@ -992,7 +992,7 @@ namespace ranges { indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T1*> constexpr replace_copy_result<I, O> replace_copy(I first, S last, O result, const T1& old_value, const T2& new_value, - Proj proj = {}); // Since C++20 + Proj proj = {}); // since C++20 template<input_range R, class T1, class T2, output_iterator<const T2&> O, class Proj = identity> @@ -1001,54 +1001,54 @@ namespace ranges { projected<iterator_t<R>, Proj>, const T1*> constexpr replace_copy_result<borrowed_iterator_t<R>, O> replace_copy(R&& r, O result, const T1& old_value, const T2& new_value, - Proj proj = {}); // Since C++20 + Proj proj = {}); // since C++20 template<class I, class O> - using replace_copy_if_result = in_out_result<I, O>; // Since C++20 + using replace_copy_if_result = in_out_result<I, O>; // since C++20 template<input_iterator I, sentinel_for<I> S, class T, output_iterator<const T&> O, class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred> requires indirectly_copyable<I, O> constexpr replace_copy_if_result<I, O> replace_copy_if(I first, S last, O result, Pred pred, const T& new_value, - Proj proj = {}); // Since C++20 + Proj proj = {}); // since C++20 template<input_range R, class T, output_iterator<const T&> O, class Proj = identity, indirect_unary_predicate<projected<iterator_t<R>, Proj>> Pred> requires indirectly_copyable<iterator_t<R>, O> constexpr replace_copy_if_result<borrowed_iterator_t<R>, O> replace_copy_if(R&& r, O result, Pred pred, const T& new_value, - Proj proj = {}); // Since C++20 + Proj proj = {}); // since C++20 template<class I> - using prev_permutation_result = in_found_result<I>; // Since C++20 + using prev_permutation_result = in_found_result<I>; // since C++20 template<bidirectional_iterator I, sentinel_for<I> S, class Comp = ranges::less, class Proj = identity> requires sortable<I, Comp, Proj> constexpr ranges::prev_permutation_result<I> - ranges::prev_permutation(I first, S last, Comp comp = {}, Proj proj = {}); // Since C++20 + ranges::prev_permutation(I first, S last, Comp comp = {}, Proj proj = {}); // since C++20 template<bidirectional_range R, class Comp = ranges::less, class Proj = identity> requires sortable<iterator_t<R>, Comp, Proj> constexpr ranges::prev_permutation_result<borrowed_iterator_t<R>> - ranges::prev_permutation(R&& r, Comp comp = {}, Proj proj = {}); // Since C++20 + ranges::prev_permutation(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 template<class I> - using next_permutation_result = in_found_result<I>; // Since C++20 + using next_permutation_result = in_found_result<I>; // since C++20 template<bidirectional_iterator I, sentinel_for<I> S, class Comp = ranges::less, class Proj = identity> requires sortable<I, Comp, Proj> constexpr ranges::next_permutation_result<I> - ranges::next_permutation(I first, S last, Comp comp = {}, Proj proj = {}); // Since C++20 + ranges::next_permutation(I first, S last, Comp comp = {}, Proj proj = {}); // since C++20 template<bidirectional_range R, class Comp = ranges::less, class Proj = identity> requires sortable<iterator_t<R>, Comp, Proj> constexpr ranges::next_permutation_result<borrowed_iterator_t<R>> - ranges::next_permutation(R&& r, Comp comp = {}, Proj proj = {}); // Since C++20 + ranges::next_permutation(R&& r, Comp comp = {}, Proj proj = {}); // since C++20 } |