<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 1042</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="1042"></A><H4>1042.
  
Attributes in <I>alias-declaration</I>s
</H4>
<B>Section: </B>9.1&#160; [<A href="https://wg21.link/dcl.pre">dcl.pre</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-04<BR>


<P>[Voted into the WP at the March, 2011 meeting as part of paper N3262.]</P>

<P>The grammar for an <I>alias-declaration</I> does not have a
place for an <I>attribute-specifier</I>, although a
<TT>typedef</TT> declaration does.  Since an
<I>alias-declaration</I> is 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), this could be surprising.</P>

<P><B>Proposed resolution (February, 2011) [SUPERSEDED]:</B></P>

<OL>
<LI><P>Change the grammar in 9.1 [<A href="https://wg21.link/dcl.pre#1">dcl.pre</A>] paragraph 1 as
follows:</P></LI>

<UL>
<I>alias-declaration:</I>
<UL>
<TT>using</TT> <I>identifier <INS>attribute-specifier-seq<SUB>opt</SUB></INS></I> <TT>=</TT> <I>type-id</I> <TT>;</TT>
</UL>
</UL>

<LI><P>Change 9.2.4 [<A href="https://wg21.link/dcl.typedef#2">dcl.typedef</A>] paragraph 2 as follows:</P></LI>

<BLOCKQUOTE>

A <I>typedef-name</I> can also be introduced by an
<I>alias-declaration</I>. The <I>identifier</I> following the
<TT>using</TT> keyword becomes a <I>typedef-name</I> <INS>and the
optional <I>attribute-specifier-seq</I> following the <I>identifier</I>
appertains to that <I>typedef-name</I></INS>.  It has the same
semantics...

</BLOCKQUOTE>

</OL>

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