This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-12-19


1012. Undeprecating static

Section: 9.8.2.2  [namespace.unnamed]     Status: C++11     Submitter: Ville Voutilainen     Date: 2009-12-09

[Voted into the WP at the November, 2010 meeting.]

N3092 comment FI 6

Although 9.8.2.2 [namespace.unnamed] states that the use of the static 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.

Proposed resolution (August, 2010):

  1. Delete 9.8.2.2 [namespace.unnamed] paragraph 2:

  2. The use of the static keyword is deprecated when declaring variables in a namespace scope (see annex Clause Annex D [depr]); the unnamed-namespace provides a superior alternative.
  3. Delete _N3225_.D.2 [depr.static]:

  4. D.2 static keyword [depr.static]

    The use of the static keyword is deprecated when declaring objects in namespace scope (see 6.4.6 [basic.scope.namespace]).