Sorted with respect to comparator (only)
Casey Carter

Created on 2022-06-10.00:00:00 last changed 5 days ago


Date: 2022-06-21.11:47:28

Proposed resolution:

This wording is relative to N4910.

  1. Modify [alg.sorting.general] as indicated:

    -5- A sequence is sorted with respect to a comp and proj for a comparator and projection comp and proj if for every iterator i pointing to the sequence and every non-negative integer n such that i + n is a valid iterator pointing to an element of the sequence,

    bool(invoke(comp, invoke(proj, *(i + n)), invoke(proj, *i)))

    is false.

    -?- A sequence is sorted with respect to a comparator comp for a comparator comp if it is sorted with respect to comp and identity{} (the identity projection).

Date: 2022-06-15.00:00:00

[ 2022-06-21; Reflector poll ]

Set status to Tentatively Ready after eight votes in favour during reflector poll.

Date: 2022-06-10.00:00:00

P0896R4 changed the term of art "sorted with respect to comparator" defined in [alg.sorting.general] paragraph 5 to "sorted with respect to comparator and projection." That proposal updated the algorithm specifications consistently. However, there were uses of the old term outside of [algorithms] that are now without meaning. We should bring back the term "sorted with respect to comparator" to fix that lack.

Date User Action Args
2022-06-21 11:47:28adminsetmessages: + msg12524
2022-06-21 11:47:28adminsetstatus: new -> ready
2022-06-11 17:55:34adminsetmessages: + msg12497
2022-06-10 00:00:00admincreate