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.

3805. Expression evaluating to a call wrapper is a prvalue, not an object

Section: 22.10 [function.objects], 26.5.7.3 [range.utility.conv.adaptors], 26.7.2 [range.adaptor.object] Status: New Submitter: Johel Ernesto Guerrero Peña Opened: 2022-10-26 Last modified: 2022-11-01

Priority: 4

View all other issues in [function.objects].

View all issues with New status.

Discussion:

22.10.3 [func.def] defines

-6- A call wrapper is an object of a call wrapper type.

Most importantly, a call wrapper is an object.

A number of functions in 22.10 [function.objects] and expressions in 26.5.7.3 [range.utility.conv.adaptors] and 26.7.2 [range.adaptor.object] are specified to result in a call wrapper. Most notably, the return type of ranges::to is auto, so its result is definitely a prvalue and not a "call wrapper" object.

Where a prvalue result is meant, the wording should be clarified to mean "a prvalue whose object it initializes is a call wrapper".

[2022-11-01; Reflector poll]

Set priority to 4 after reflector poll.

Proposed resolution: