std::ranges::stable_partition - cppreference.com

en.cppreference.com/w/cpp/algorithm/ranges/stable_partition     2025-02-11T00:00:00.0000000
The algorithms is stable, i.e. the relative order of elements is preserved. 2) Same as (1) , but uses r as the range, as if using ranges:: begin ( r ) as first and ranges:: end ( r ) as last . The function-like entities described on this page are algorithm function objects (informally known as niebloids ), that is:

std::stable_partition - cppreference.com

en.cppreference.com/w/cpp/algorithm/stable_partition.html     2025-02-10T00:00:00.0000000
If the algorithm fails to allocate memory, std::bad_alloc is thrown. Notes. This function attempts to allocate a temporary buffer. If the allocation fails, the less efficient algorithm is chosen. Implementations in libc++ and libstdc++ also accept ranges denoted by LegacyForwardIterator s as an extension.

std::ranges::partition - cppreference.com

en.cppreference.com/w/cpp/algorithm/ranges/partition     2025-02-11T00:00:00.0000000
The function-like entities described on this page are algorithm function objects (informally known as niebloids), that is: . Explicit template argument lists cannot be specified when calling any of them. None of them are visible to argument-dependent lookup.; When any of them are found by normal unqualified lookup as the name to the left of the function-call operator, argument-dependent lookup ...

Constrained algorithms (since C++20) - cppreference.com

en.cppreference.com/w/cpp/algorithm/ranges     2024-11-27T00:00:00.0000000
C++20 provides constrained versions of most algorithms in the namespace std::ranges.In these algorithms, a range can be specified as either an iterator-sentinel pair or as a single range argument, and projections and pointer-to-member callables are supported. Additionally, the return types of most algorithms have been changed to return all potentially useful information computed during the ...

Algorithms library - cppreference.com

en.cppreference.com/w/cpp/algorithm/     2025-02-14T00:00:00.0000000
Constrained algorithms (since C++20) C++20 provides constrained versions of most algorithms in the namespace std::ranges.In these algorithms, a range can be specified as either an iterator-sentinel pair or as a single range argument, and projections and pointer-to-member callables are supported. Additionally, the return types of most algorithms have been changed to return all potentially ...

std::partition - cppreference.com

en.cppreference.com/w/cpp/algorithm/partition     2024-03-29T00:00:00.0000000
first, last - the range of elements to reorder policy - the execution policy to use. See execution policy for details.: p - unary predicate which returns true if the element should be ordered before other elements. The expression p (v) must be convertible to bool for every argument v of type (possibly const) VT, where VT is the value type of ForwardIt, regardless of value category, and must ...

std::ranges::partition_point - cppreference.com

en.cppreference.com/w/cpp/algorithm/ranges/partition_point     2025-02-11T00:00:00.0000000
Examines the partitioned (as if by ranges::partition) range [first, last) or r and locates the end of the first partition, that is, the projected element that does not satisfy pred or last if all projected elements satisfy pred.. The function-like entities described on this page are algorithm function objects (informally known as niebloids), that is: ...

std::partition_point - cppreference.com

en.cppreference.com/w/cpp/algorithm/partition_point     2025-02-11T00:00:00.0000000
Examines the partitioned range [first, last) and locates the end of the first partition, that is, the first element that does not satisfy p or last if all elements satisfy p. If the elements elem of [ first , last ) are not partitioned with respect to the expression bool ( p ( elem ) ) , the behavior is undefined.

std::ranges:: partition_copy, std::ranges:: partition_copy_result

en.cppreference.com/w/cpp/algorithm/ranges/partition_copy     2025-02-11T00:00:00.0000000
1) Copies the elements from the input range [first, last) to two different output ranges depending on the value returned by the predicate pred.The elements that satisfy the predicate pred after projection by proj are copied to the range beginning at out_true.The rest of the elements are copied to the range beginning at out_false.The behavior is undefined if the input range overlaps either of ...

std::ranges:: remove, std::ranges:: remove_if - Reference

en.cppreference.com/w/cpp/algorithm/ranges/remove     2024-05-20T00:00:00.0000000
Return value {ret, last}, where [first, ret) is the resulting subrange after removal, and the elements in subrange [ret, last) are all in valid but unspecified state, i.e. [ret, last) is the subrange to be erased.[] ComplexitExactly N applications of the corresponding predicate and any projection, where N = ranges:: distance (first, last), and N -1 move operations at worst.
Feedback