Nesting unnamed namespaces

Viewed 2444

Is there a functional difference between these two nested usages of unnamed namespaces:

namespace A { namespace {
  void foo() {/*...*/}
}}

and

namespace { namespace A {
  void foo() {/*...*/}
}}

As far as I see it, both foos will get an internal unique identifier per compilation unit and can be accessed with A::foo - but is there a subtle or not-so-subtle difference that I'm not seeing?

1 Answers
Related