cmcstl2 icon indicating copy to clipboard operation
cmcstl2 copied to clipboard

Implemented changes from P1716

Open tomaszkam opened this issue 5 years ago • 2 comments

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.

tomaszkam avatar Jun 14 '19 12:06 tomaszkam

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.

tomaszkam avatar Jun 14 '19 12:06 tomaszkam

Added Equivalence and IndirectEquivalence relation that are now used to constrain the following algorithms:

  • is_permutation
  • unique and unique_copy

tomaszkam avatar Jun 15 '19 07:06 tomaszkam