Created on 2010-08-02.00:00:00 last changed 130 months ago
[Voted into the WP at the November, 2010 meeting.]
Proposed resolution (August, 2010):
Change 6.6 [basic.link] paragraph 4 as follows:
An unnamed namespace or a namespace declared directly or indirectly within an unnamed namespace has internal linkage. All other namespaces have external linkage. A name having namespace scope that has not been given internal linkage above hasexternal linkagethe same linkage as the enclosing namespace if it is the name of
a variable
, unless it has internal linkage; ora function
, unless it has internal linkage; ora named class (Clause 11 [class]), or an unnamed class defined in a typedef declaration in which the class has the typedef name for linkage purposes (9.2.4 [dcl.typedef]); or
a named enumeration (9.7.1 [dcl.enum]), or an unnamed enumeration defined in a typedef declaration in which the enumeration has the typedef name for linkage purposes (9.2.4 [dcl.typedef]); or
an enumerator belonging to an enumeration with
externallinkage; ora template
, unless it is a function template that has internal linkage (Clause 13 [temp]); or.
a namespace (9.8 [basic.namespace]), unless it is declared within an unnamed namespace.
It is odd that, in the following example, N has no linkage but g has external linkage:
namespace { namespace N // has no linkage { void g(); // has external linkage } }
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: fdis -> c++11 |
2011-04-10 00:00:00 | admin | set | status: dr -> fdis |
2010-11-29 00:00:00 | admin | set | messages: + msg3146 |
2010-11-29 00:00:00 | admin | set | status: ready -> dr |
2010-08-23 00:00:00 | admin | set | messages: + msg2760 |
2010-08-02 00:00:00 | admin | create |