<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 876</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="876"></A><H4>876.
  
Type references in rvalue reference deduction specification
</H4>
<B>Section: </B>13.10.3.2&#160; [<A href="https://wg21.link/temp.deduct.call">temp.deduct.call</A>]
 &#160;&#160;&#160;

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

 <B>Submitter: </B>Steve Adamczyk
 &#160;&#160;&#160;

 <B>Date: </B>20 April, 2009<BR>


<P>[Voted into WP at October, 2009 meeting.]</P>

<P>13.10.3.2 [<A href="https://wg21.link/temp.deduct.call#3">temp.deduct.call</A>] paragraph 3 says,</P>

<BLOCKQUOTE>

If <TT>P</TT> is of the form <TT>T&amp;&amp;</TT>, where <TT>T</TT> is
a template parameter, and the argument is an lvalue, the type
<TT>A&amp;</TT> is used in place of <TT>A</TT> for type deduction.

</BLOCKQUOTE>

<P>The type references in that sentence are inconsistent with the
normal usage in the Standard; they should instead refer to
&#8220;an rvalue reference to a cv-unqualified template parameter&#8221;
and &#8220;lvalue reference to <TT>A</TT>.&#8221;</P>

<P><B>Proposed resolution (July, 2009):</B></P>

<P>Change 13.10.3.2 [<A href="https://wg21.link/temp.deduct.call#3">temp.deduct.call</A>] paragraph 3 as follows:</P>

<BLOCKQUOTE>

If <TT>P</TT> is a cv-qualified type, the top level cv-qualifiers of
<TT>P</TT>'s type are ignored for type deduction.  If <TT>P</TT> is a
reference type, the type referred to by <TT>P</TT> is used for type
deduction.  If <TT>P</TT> is <DEL>of the form <TT>T&amp;&amp;</TT>,
where <TT>T</TT> is a template parameter,</DEL> <INS>an rvalue
reference to a cv-unqualified template parameter</INS> and the
argument is an lvalue, the type <DEL><TT>A&amp;</TT></DEL>
<INS>&#8220;lvalue reference to <TT>A</TT>&#8221;</INS> is used in
place of <TT>A</TT> for type deduction.

</BLOCKQUOTE>

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