10

[basic.link] paragraph 4 in the C++14 Standard:

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 the same linkage as the enclosing namespace if it is the name of ...

What does it mean by "indirectly declaring a namespace within another namespace" above?

Alexander
  • 2,581
  • 11
  • 17
  • 2
    Possible duplicate of [Linkage of symbols within anonymous namespace within a regular namespace](http://stackoverflow.com/questions/4181059/linkage-of-symbols-within-anonymous-namespace-within-a-regular-namespace) – Alex Oct 27 '15 at 20:34
  • @Alex I cannot see how the answers to that question answer this one. – Walter Oct 27 '15 at 22:39

1 Answers1

4

It means a namespace nested inside an unnamed namespace, so either a namespace declared as a member of an unnamed namespace, or declared as a member of a namespace declared as a member of an unnamed namespace, or so on.

Brian Bi
  • 111,498
  • 10
  • 176
  • 312