<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 1012</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="1012"></A><H4>1012.
  
Undeprecating <TT>static</TT>
</H4>
<B>Section: </B>9.9.2.2&#160; [<A href="https://wg21.link/namespace.unnamed">namespace.unnamed</A>]
 &#160;&#160;&#160;

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

 <B>Submitter: </B>Ville Voutilainen
 &#160;&#160;&#160;

 <B>Date: </B>2009-12-09<BR><BR>


<P>[Voted into the WP at the November, 2010 meeting.]</P>

<A href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3296.html#FI6">N3092 comment
  FI&#160;6<BR></A>



<P>Although 9.9.2.2 [<A href="https://wg21.link/namespace.unnamed">namespace.unnamed</A>] states that the use of the
<TT>static</TT> keyword for declaring variables in namespace scope is
deprecated because the unnamed namespace provides a superior
alternative, it is unlikely that the feature will be removed at any
point in the foreseeable future, especially in light of C compatibility
concerns.  The Committee should consider removing the deprecation.</P>

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

<OL>
<LI><P>Delete 9.9.2.2 [<A href="https://wg21.link/namespace.unnamed#2">namespace.unnamed</A>] paragraph 2:</P></LI>

<BLOCKQUOTE>

<DEL>The use of the <TT>static</TT> keyword is deprecated when declaring
variables in a namespace scope (see annex Clause Annex D [<A href="https://wg21.link/depr">depr</A>]); the
<I>unnamed-namespace</I> provides a superior alternative.</DEL>

</BLOCKQUOTE>

<LI><P>Delete _N3225_.D.2 [<A href="https://wg21.link/depr.static">depr.static</A>]:</P></LI>

<BLOCKQUOTE>

<P><TABLE width="100%"><TR>
<TD><DEL><B>D.2 <TT>static</TT> keyword</B></DEL></TD>
<TD align="right"><DEL><B>[depr.static]</B></DEL></TD>
</TR></TABLE></P>

<P><DEL>The use of the <TT>static</TT> keyword is deprecated when
declaring objects in namespace scope (see 6.4.6 [<A href="https://wg21.link/basic.scope.namespace">basic.scope.namespace</A>]).</DEL></P>

</BLOCKQUOTE>

</OL>

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