<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 1269</TITLE>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<STYLE TYPE="text/css">
  INS { text-decoration:none; font-weight:bold; background-color:#A0FFA0 }
  .INS { text-decoration:none; background-color:#D0FFD0 }
  DEL { text-decoration:line-through; background-color:#FFA0A0 }
  .DEL { text-decoration:line-through; background-color: #FFD0D0 }
  @media (prefers-color-scheme: dark) {
    HTML { background-color:#202020; color:#f0f0f0; }
    A { color:#5bc0ff; }
    A:visited { color:#c6a8ff; }
    A:hover, a:focus { color:#afd7ff; }
    INS { background-color:#033a16; color:#aff5b4; }
    .INS { background-color: #033a16; }
    DEL { background-color:#67060c; color:#ffdcd7; }
    .DEL { background-color:#67060c; }
  }
  SPAN.cmnt { font-family:Times; font-style:italic }
</STYLE>
</HEAD>
<BODY>
<P><EM>This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21
  Core Issues List revision 118b.
  See http://www.open-std.org/jtc1/sc22/wg21/ for the official
  list.</EM></P>
<P>2025-09-28</P>
<HR>
<A NAME="1269"></A><H4>1269.
  
<TT>dynamic_cast</TT> of an xvalue operand
</H4>
<B>Section: </B>7.6.1.7&#160; [<A href="https://wg21.link/expr.dynamic.cast">expr.dynamic.cast</A>]
 &#160;&#160;&#160;

 <B>Status: </B>CD3
 &#160;&#160;&#160;

 <B>Submitter: </B>Michael Wong
 &#160;&#160;&#160;

 <B>Date: </B>2011-03-21<BR>


<P>[Moved to DR at the October, 2012 meeting.]</P>

<P>7.6.1.7 [<A href="https://wg21.link/expr.dynamic.cast#2">expr.dynamic.cast</A>] 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.</P>

<P><B>Proposed resolution (August, 2011):</B></P>

<P>Change 7.6.1.7 [<A href="https://wg21.link/expr.dynamic.cast#6">expr.dynamic.cast</A>] paragraph 6 as follows:</P>

<BLOCKQUOTE>

Otherwise, <TT>v</TT> shall be a pointer to or <DEL>an lvalue</DEL>
<INS>a glvalue</INS> of a polymorphic type (11.7.3 [<A href="https://wg21.link/class.virtual">class.virtual</A>]).

</BLOCKQUOTE>

<P><B>Additional note, January, 2012:</B></P>

<P>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.</P>

<BR><BR>
</BODY>
</HTML>
