- Title
- Linkage of namespace member of unnamed namespace
- Status
- c++11
- Section
- 6.7 [basic.link]
- Submitter
- DE
Created on 2010-08-02.00:00:00 last changed 152 months ago
Messages
Date: 2010-11-15.00:00:00
[Voted into the WP at the November, 2010 meeting.]
Date: 2010-08-15.00:00:00
Proposed resolution (August, 2010): Change 6.7 [basic.link] paragraph 4 as follows: a variable a function a 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.8.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
a template
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 has
external linkage
the same linkage as the enclosing namespace if it
is the name of
, unless it has internal
linkage; or, unless it has internal
linkage; orexternal linkage; or, unless it is a function template
that has internal linkage (Clause 13 [temp]);
or.
a namespace (9.9 [basic.namespace]), unless it is
declared within an unnamed namespace.
Date: 2010-08-02.00:00:00
N3092 comment
DE 4 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 | |