This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 114a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-04-18


779. Rvalue reference members of closure objects?

Section: 7.5.5.2  [expr.prim.lambda.closure]     Status: CD2     Submitter: Mike Miller     Date: 26 February, 2009

[Voted into the WP at the July, 2009 meeting as part of N2927.]

7.5.5 [expr.prim.lambda] paragraph 8, bullet 2, says of members of a closure class,

if the element is of the form & N, the data member has the name N and type “reference to object type of N

Is an implementation free to use an rvalue reference as the type of this member, as only a “reference” is specified? (See issue 771; the move constructor would be well-formed if the reference member were an rvalue reference.)

Proposed resolution (July, 2009)

See document PL22.16/09-0117 = WG21 N2927.