<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 2064</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="2064"></A><H4>2064.
  
Conflicting specifications for dependent <I>decltype-specifier</I>s
</H4>
<B>Section: </B>13.6&#160; [<A href="https://wg21.link/temp.type">temp.type</A>]
 &#160;&#160;&#160;

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

 <B>Submitter: </B>Richard Smith
 &#160;&#160;&#160;

 <B>Date: </B>2014-12-27<BR>


<P>[Adopted at the February, 2016 meeting.]</P>



<P>According to 13.8.3.2 [<A href="https://wg21.link/temp.dep.type#9">temp.dep.type</A>] paragraph 9, a type is
dependent if it is</P>

<BLOCKQUOTE>

denoted by <TT>decltype(</TT><I>expression</I><TT>)</TT>,
where <I>expression</I> is
type-dependent (13.8.3.3 [<A href="https://wg21.link/temp.dep.expr">temp.dep.expr</A>]).

</BLOCKQUOTE>

<P>However, 13.6 [<A href="https://wg21.link/temp.type#2">temp.type</A>] paragraph 2 says,</P>

<BLOCKQUOTE>

If an expression <TT>e</TT> involves a template parameter,
<TT>decltype(e)</TT> denotes a unique dependent type. Two
such <I>decltype-specifier</I>s refer to the same type only
if their expressions are equivalent
(13.7.7.2 [<A href="https://wg21.link/temp.over.link">temp.over.link</A>]). [<I>Note:</I> however, it
may be aliased, e.g., by
a <I>typedef-name</I>. &#8212;<I>end note</I>]

</BLOCKQUOTE>

<P>These seem to be in need of reconciliation.</P>

<P><B>Proposed resolution (January, 2016):</B></P>

<P>Change 13.6 [<A href="https://wg21.link/temp.type#2">temp.type</A>] paragraph 2 as follows:</P>

<BLOCKQUOTE>

If an expression <TT>e</TT> <DEL>involves a template parameter</DEL>
<INS>is type-dependent (13.8.3.3 [<A href="https://wg21.link/temp.dep.expr">temp.dep.expr</A>])</INS>,
<TT>decltype(e)</TT> denotes a unique dependent type. Two
such <I>decltype-specifier</I>s refer to the same type only
if their expressions are equivalent
(13.7.7.2 [<A href="https://wg21.link/temp.over.link">temp.over.link</A>]). [<I>Note:</I> however, <DEL>it</DEL>
<INS>such a type</INS> may be aliased, e.g., by
a <I>typedef-name</I>. &#8212;<I>end note</I>]

</BLOCKQUOTE>

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