Movatterモバイル変換


[0]ホーム

URL:


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

2025-12-20


964. Incorrect description of when the lvalue-to-rvalue conversion applies

Section:7.2.1  [basic.lval]    Status:C++11    Submitter:Doug Gregor    Date:14 September, 2009

[Voted into the WP at the November, 2010 meeting.]

7.2.1 [basic.lval] paragraph 7 says,

Whenever an lvalue appears in a context where an rvalue is expected,the lvalue is converted to an rvalue

That is not correct in the context of an attempt to bind anrvalue reference to an lvalue (9.5.4 [dcl.init.ref]).

Proposed resolution (October, 2009):

Change 7.2.1 [basic.lval] paragraph 7 as follows:

Whenever an lvalue appears in a context where an rvalue is expectedand an lvalue is not explicitly prohibited (as, for example, in9.5.4 [dcl.init.ref]),the lvalueitis converted to an rvalue; see 7.3.2 [conv.lval], 7.3.3 [conv.array], and 7.3.4 [conv.func].

Notes from the March, 2010 meeting:

This resolution needs to be reconsidered in light of the newexpression taxonomy.

Proposed resolution (September, 2010):

Change 7.2.1 [basic.lval] paragraph 2 as follows:

Whenever a glvalue appears in a context where a prvalue is expected,the glvalue is converted to a prvalue; see 7.3.2 [conv.lval],7.3.3 [conv.array], and 7.3.4 [conv.func].[Note: An attempt to bind an rvalue reference to an lvalueis not such a context; see 9.5.4 [dcl.init.ref]. —endnote]



[8]ページ先頭

©2009-2026 Movatter.jp