cxxomfort
rel.20211024
Simple backports for C++ - https://ryan.gulix.cl/fossil.cgi/cxxomfort/
|
cxxomfort Supplementals for <algorithm>
This component provides supplementary features for the set of algorithms present in <algorithm>
that are specific to cxxomfort, as well as functions that complete the family of _n
functions such as transform_n
.
Interfaces defined here:
valcmp()
- compares two values the way eg.: memcmp
does.any_on()
, all_on()
, none_on()
- check a number of predicates on a given value.is_clamped()
- complement to clamp()
from p1440.clamp_halfopen()
, is_clamped_halfopen()
- half-open intervals complements to clamp()
.copy_leftmost_n()
, copy_rightmost_n
() - copies from either end of a sequence.copy_if_not()
- complementary to find_if_not
.count_while()
- counts elements in a sequence.find_not()
, find_if_not()
- complements to find()
, from p1223.find()
, from lwg127.find_inversion()
- finds elements out of place in a sequence.find_last_if()
- finds elements matching a predicate.transform_inplace()
, transform_inplace_if()
- transforms sequences in-place.transform_n()
- transforms sequences.count_frequencies_map()
, count_frequencies()
- gathers data frequency in a sequence.relative_search()
- finds element ranges matching a differential.lfv2::erase()
, lfv2::erase_if()
from Fundamentals V2 - simplified erase-remove idiom for sequence containers.All interfaces are defined in the namespace cxxomfort::library::algorithm::
.
Cxxomfort includes the functions all_on()
, any_on()
, none_on()
which are analogues to the std all/any/none_of family of functions. Where the original functions check a predicate f over all elements of a sequence, the new _on
functions evalue all predicates on a sequence on an element el.
Cxxomfort includes, in namespace cxxomfort::library::algorithm::lfv2
:: the following additions from the Library Fundamentals v2 not yet accepted into Standard as of C++17:
erase()
- invokes member
.erase() on a container.erase_if()
- invokes member
.erase_if() on a container.