cmcstl2
cmcstl2 copied to clipboard
Implemented changes from P1716
The changes in this papers weakness the constrains of compare algorithm to be derived from the predicate (required invocation only in the specific direction). The IndirectRelation concept is now replaced with IndirectBinaryPredicate, that requires only single order of argument. The IndirectlyComparable concept is now derived from IndirectBinaryPredicate.
Updated the following algorithms, to use IndirectRelation:
- find,
- adjacent_find,
- count,
- replace and replace_copy,
- remove and remove_copy,
In addition the following two algorithms were changed to use IndirectlyComparable as they compare elements of two different sequences:
- find_first_of,
- mismatch.
Confirmed that all affected algorithms are still well-formed, as they are calling invoke(invoke(proj1, first1), invoke(proj2, first2))
. This includes once that are constrained with IndirectlyComparable
:
- split_view,
- find_end,
- equal,
- serach,
- serach_n.
Added Equivalence and IndirectEquivalence relation that are now used to constrain the following algorithms:
- is_permutation
- unique and unique_copy