unnamed namespace

后端 未结 4 857
北荒
北荒 2020-12-10 04:03

What does it exactly mean when the Standard states

$7.3.1.1/2 - \"The use of the static keyword is deprecated when declaring variables in a namesp

4条回答
  •  既然无缘
    2020-12-10 04:30

    Interestingly, ISO/IEC 14882:2011 (C++11) removed this language (in fact, it removes the whole paragraph §7.3.1.1/2). It also removes the mention of static from Annex D.

    Thus, using the storage class specifier static to give a name internal linkage still works (§3.5/3) and is no longer deprecated.

提交回复
热议问题