|
cxxomfort
rel.20211024
Simple backports for C++ - https://ryan.gulix.cl/fossil.cgi/cxxomfort/
|
Implementations and Backports for Standard header algorithm.This header covers backports for the various algorithm utilities in C++. A general listing of the Standard utilities here, with sample implementations, can be found at header/algorithm @ cppreference.
More...
Namespaces | |
| cxxomfort | |
Namespace of the cxxomfort library. | |
| cxxomfort::cxxostd | |
| Backports made available by cxxomfort. | |
| cxxomfort::fix | |
| Fixes for implementation issues in std. | |
Functions | |
| template<typename It , typename T > | |
| CXXO_CONSTEXPR14 void | fill (It ini, It fin, T const &tv) |
| Fills a sequence with a given value. More... | |
| template<typename It , typename Numeric , typename T > | |
| CXXO_CONSTEXPR14 void | fill_n (It ini, Numeric n, T const &tv) |
| Fills a sequence with a given value. More... | |
| template<typename InpI , typename OutI , typename Predicate > | |
| OutI | copy_if (InpI ini, InpI fin, OutI dest, Predicate f) |
| Copy elements conditionally to dest if they fulfill f .Copy elements from one sequence to another. More... | |
| template<typename InpI , typename Integral , typename OutI > | |
| OutI | copy_n (InpI ini, Integral n, OutI dest) |
| Copy a given amount of elements to dest . More... | |
| template<typename InpI , typename OutI1 , typename OutI2 , typename Predicate > | |
| std::pair< OutI1, OutI2 > | partition_copy (InpI ini, InpI const fin, OutI1 Dtrue, OutI2 Dfalse, Predicate f) |
Conditionally copy from sequence [ini,fin) to either sequence starting at Dtrue or Dfalsef . More... | |
| template<class It , class Pred > | |
| CXXO_CONSTEXPR14 It | find_if (It ini, It fin, Pred f) |
| Finds an element in a sequence that matches a predicate. More... | |
| template<class It , class Pred > | |
| CXXO_CONSTEXPR14 It | find_if_not (It ini, It fin, Pred f) |
Finds like find_if but the predicate is reversed. More... | |
| template<class It , class Pred > | |
| CXXO_CONSTEXPR14 std::iterator_traits< It >::difference_type | count_if (It ini, It fin, Pred p) |
| Counts the number of times in a sequence the criteria p is matched. More... | |
| template<class It , typename T > | |
| CXXO_CONSTEXPR14 std::iterator_traits< It >::difference_type | count (It ini, It fin, T const &tv) |
| Counts the number of times in a sequence a given value is found. More... | |
| template<class RAIterator , class URNG > | |
| void | shuffle (RAIterator ini, RAIterator fin, URNG &g) |
| Shuffles a sequence according to a generator call g(). More... | |
| template<typename Iterator , typename Compare > | |
| bool | is_sorted (Iterator ini, Iterator fin, Compare less) |
| Determines if a sequence is sorted according to a given criteria. More... | |
| template<typename Iterator > | |
| bool | is_sorted (Iterator ini, Iterator fin) |
| template<class II , class Size , class UnaryFunction > | |
| II | for_each_n (II first, Size n, UnaryFunction f) |
| Executes a function once for each element in a sequence, using it as an argument. More... | |
| template<typename T > | |
| constexpr T | clamp (cxxomfort::constexpr_t, T x, T Min, T Max) noexcept |
| template<typename It , typename T > | |
| constexpr It | find (cxxomfort::constexpr_t const, It ini, It fin, T const &value) |
| template<typename It , typename Fn > | |
| constexpr It | find_if (cxxomfort::constexpr_t const, It ini, It fin, Fn &&fn) |
| template<typename It , typename T > | |
| constexpr size_t | count (cxxomfort::constexpr_t const, It ini, It fin, T const &value) noexcept |
| template<typename It , typename Fn > | |
| constexpr size_t | count_if (cxxomfort::constexpr_t const, It ini, It fin, Fn &&fn) noexcept |
Implementations and Backports for Standard header algorithm.
This header covers backports for the various algorithm utilities in C++. A general listing of the Standard utilities here, with sample implementations, can be found at header/algorithm @ cppreference.
1.8.13