A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/LWG/issue3932 below:

Expression-equivalence is sometimes unimplementable when passing prvalue expressions to comparison CPOs

This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.

3932. Expression-equivalence is sometimes unimplementable when passing prvalue expressions to comparison CPOs

Section: 17.12.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().

Perhaps we should say when 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:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4