Title
compare_partial_order_fallback requires F < E
Status
c++23
Section
[cmp.alg]
Submitter
Stephan T. Lavavej

Created on 2020-07-18.00:00:00 last changed 12 months ago

Messages

Date: 2020-11-09.21:40:50

Proposed resolution:

This wording is relative to N4861.

  1. Modify [cmp.alg] as indicated:

    -6- The name compare_partial_order_fallback denotes a customization point object ([customization.point.object]). Given subexpressions E and F, the expression compare_partial_order_fallback(E, F) is expression-equivalent ([defns.expression-equivalent]) to:

    1. (6.1) — If the decayed types of E and F differ, compare_partial_order_fallback(E, F) is ill-formed.

    2. (6.2) — Otherwise, partial_order(E, F) if it is a well-formed expression.

    3. (6.3) — Otherwise, if the expressions E == F, and E < F, and F < E are allboth well-formed and convertible to bool,

      E == F ? partial_ordering::equivalent :
      E < F  ? partial_ordering::less :
      F < E  ? partial_ordering::greater :
               partial_ordering::unordered
      

      except that E and F are evaluated only once.

    4. (6.4) — Otherwise, compare_partial_order_fallback(E, F) is ill-formed.

Date: 2020-11-09.00:00:00

[ 2020-11-09 Approved In November virtual meeting. Status changed: Tentatively Ready → WP. ]

Date: 2020-07-15.00:00:00

[ 2020-07-26; Reflector prioritization ]

Set priority to 0 and status to Tentatively Ready after seven votes in favour during reflector discussions.

Date: 2020-07-18.00:00:00

compare_partial_order_fallback uses three expressions, but requires only two. The decayed types of E and F are required to be identical, but variations in constness might make a difference.

History
Date User Action Args
2023-11-22 15:47:43adminsetstatus: wp -> c++23
2020-11-09 21:40:50adminsetmessages: + msg11583
2020-11-09 21:40:50adminsetstatus: ready -> wp
2020-07-26 12:28:28adminsetmessages: + msg11410
2020-07-26 12:28:28adminsetstatus: new -> ready
2020-07-19 16:19:42adminsetmessages: + msg11404
2020-07-18 00:00:00admincreate