<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 1044</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="1044"></A><H4>1044.
  
Point of declaration for an <I>alias-declaration</I>
</H4>
<B>Section: </B>6.4.2&#160; [<A href="https://wg21.link/basic.scope.pdecl">basic.scope.pdecl</A>]
 &#160;&#160;&#160;

 <B>Status: </B>C++11
 &#160;&#160;&#160;

 <B>Submitter: </B>Daveed Vandevoorde
 &#160;&#160;&#160;

 <B>Date: </B>2010-03-05<BR>


<P>[Voted into the WP at the March, 2011 meeting.]</P>

<P>The current wording of 6.4.2 [<A href="https://wg21.link/basic.scope.pdecl">basic.scope.pdecl</A>] does not specify
the point of declaration for an <I>alias-declaration</I> (although it
does do so in paragraph 3 for a template alias: &#8220;The point of
declaration of a template alias immediately follows the identifier
for the alias being declared&#8221;).  One might assume that an
<I>alias-declaration</I> would be the same, but it's not clear that
that is the right resolution (for either declaration, but especially
for the <I>alias-declaration</I>).</P>

<P>An <I>alias-declaration</I> is intended to be essentially a
different syntactic form of a <TT>typedef</TT> declaration
(9.2.4 [<A href="https://wg21.link/dcl.typedef#2">dcl.typedef</A>] paragraph 2).  Placing the point of
declaration at the trailing semicolon instead of following the name
of the alias would allow more compatibility with the capabilities of
<TT>typedef</TT>s, for instance:</P>

<PRE>
    struct S { };
    namespace N {
        using S = S;
    }
</PRE>



<P><B>Notes from the November, 2010 meeting:</B></P>

<P>The CWG agreed that the point of declaration for both template
and non-template cases should be at the semicolon.</P>

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

<P>Change 6.4.2 [<A href="https://wg21.link/basic.scope.pdecl#3">basic.scope.pdecl</A>] paragraph 3 as follows:</P>

<BLOCKQUOTE>

...The point of declaration of <DEL>a template</DEL> <INS>an</INS>
alias <INS>or alias template</INS> immediately follows <DEL>the
identifier for the alias being declared</DEL> <INS>the <I>type-id</I>
to which the alias refers</INS>.

</BLOCKQUOTE>

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