dynamic_cast of an xvalue operand
Section [expr.dynamic.cast]
Michael Wong

Created on 2011-03-21.00:00:00 last changed 90 months ago


Date: 2012-10-15.00:00:00

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

Date: 2012-01-17.00:00:00

Additional note, January, 2012:

An objection has been raised to the proposed resolution on the basis that it unnecessarily weakens the distinction between rvalues and lvalues, making it easier to create dangling references. Its status has therefore been changed back to "review" to allow further discussion.

Date: 2011-08-15.00:00:00

Proposed resolution (August, 2011):

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

Otherwise, v shall be a pointer to or an lvalue a glvalue of a polymorphic type (11.7.3 [class.virtual]).
Date: 2011-03-21.00:00:00 [expr.dynamic.cast] paragraph 2 allows an expression of any value category when the target type is an rvalue reference. However, paragraph 6 requires that the operand be an lvalue if the runtime check is to be applied. This requirement should presumably be relaxed to require only a glvalue when the target type is an rvalue reference.

Date User Action Args
2014-03-03 00:00:00adminsetstatus: drwp -> cd3
2013-05-03 00:00:00adminsetstatus: dr -> drwp
2012-11-03 00:00:00adminsetmessages: + msg4128
2012-11-03 00:00:00adminsetstatus: ready -> dr
2012-02-27 00:00:00adminsetstatus: review -> ready
2012-01-17 00:00:00adminsetmessages: + msg3599
2012-01-17 00:00:00adminsetstatus: ready -> review
2011-09-06 00:00:00adminsetmessages: + msg3432
2011-03-21 00:00:00admincreate