diff options
author | A. Jiang <de34@live.cn> | 2025-03-06 09:23:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-06 09:23:55 +0800 |
commit | c28c5089628a443e0f848c2860f5e59e68efe301 (patch) | |
tree | f96342e13bf7fb211ea34ed68db635087a499bcc /libcxx/include/algorithm | |
parent | 12c5a46c300eedb6cafc68b987abb9c1fa913e96 (diff) | |
download | llvm-c28c5089628a443e0f848c2860f5e59e68efe301.zip llvm-c28c5089628a443e0f848c2860f5e59e68efe301.tar.gz llvm-c28c5089628a443e0f848c2860f5e59e68efe301.tar.bz2 |
[libc++] Implement part of P2562R1: constexpr `ranges::stable_partition` (#129839)
Diffstat (limited to 'libcxx/include/algorithm')
-rw-r--r-- | libcxx/include/algorithm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm index 0c7cea1..8758aed 100644 --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -627,12 +627,14 @@ namespace ranges { 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 + constexpr subrange<I> // constexpr since C++26 + 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 + constexpr borrowed_subrange_t<R> // constexpr since C++26 + 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> |