Section: 17.11.6 [cmp.alg] Status: New Submitter: Jiang An Opened: 2023-05-04 Last modified: 2023-05-24
Priority: 3
View other active issues in [cmp.alg].
View all other issues in [cmp.alg].
View all issues with New status.
Discussion:
Currently, comparison CPOs may call ADL-found strong_order
, weak_order
, and partial_order
functions. It might be impossible to meet the expression-equivalent requirement if one passed argument is a prvalue
and an ADL-found function is selected, because temporary materialization must take place before entering the CPO's
operator()
.
E
or F
is a prvalue expression of an object type, temporary
materialization takes place first, and then an xvalue referring to the temporary object is used instead of the original
E
or F
.
There is currently implementation divergence in these CPOs: when performing internal comparison, libstdc++ and libc++
perfect-forward arguments, while MSVC STL always treats arguments as lvalues.
[2023-05-24; Reflector poll]
Set priority to 3 after reflector poll.
Proposed resolution: