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


1269.dynamic_cast of an xvalue operand

Section:7.6.1.7  [expr.dynamic.cast]    Status:CD3    Submitter:Michael Wong    Date:2011-03-21

[Moved to DR at the October, 2012 meeting.]

7.6.1.7 [expr.dynamic.cast] paragraph 2 allows an expression of any valuecategory when the target type is an rvalue reference. However, paragraph6 requires that the operand be an lvalue if the runtime check is to beapplied. This requirement should presumably be relaxed to require only aglvalue when the target type is an rvalue reference.

Proposed resolution (August, 2011):

Change 7.6.1.7 [expr.dynamic.cast] paragraph 6 as follows:

Otherwise,v shall be a pointer to oran lvaluea glvalue of a polymorphic type (11.7.3 [class.virtual]).

Additional note, January, 2012:

An objection has been raised to the proposed resolution on thebasis that it unnecessarily weakens the distinction between rvaluesand lvalues, making it easier to create dangling references. Itsstatus has therefore been changed back to "review" to allow furtherdiscussion.




[8]ページ先頭

©2009-2026 Movatter.jp