关于c ++:在C ++ 11中,namespace-`static仍然被弃用吗?

Is namespace-`static` still deprecated in C++11?

本问题已经有最佳答案,请猛点这里访问。

Possible Duplicate:
Deprecation of the static keyword… no more?

在C + + 2003年deprecated命名空间staticis:P></

[C++03: 7.3.1.1/2]: The use of the static keyword is deprecated when
declaring objects in a namespace scope (see annex D); the
unnamed-namespace provides a superior alternative.

我不能找到这样的条款在任何C + +(exists,2011年suggesting undeprecation)和7.1.1似乎不到prohibit命名空间static(如果它有蓝晶石that the feature,这会终于有been removed from the language);不管一个人多的房屋,在C.2曼弗雷迪或法拉利吗listed(which is between itemises重大差别2003年,安(2011年)。P></

static命名空间undeprecated or not?P></


对于N3296,提出并接受了不可分解的名称空间-static

ID: FI 6
Ref: D.2 [depr.static] ? Paragraph 1
Comment: The use of static in namespace scope should not be deprecated. Anonymous namespaces are not a sufficient replacement for the functionality.
Proposed Resolution: Strike [depr.static] completely.
Owner: CWG
Issue: 1012
Disposition: ACCEPTED

事实上,条款C(关于兼容性)没有列出对条款D(关于拒绝)所做的任何更改,因此很难"一目了然"地说出来。但是,在C++ 11中,NAMESPACE EDOCX1 0不再被删除。