Re: template instantiation and anonymous namespaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"John (Eljay) Love-Jensen" <eljay@xxxxxxxxx> writes:

>> As I understand it, the anonymous namespace has internal linkage...
>
> Sort of, but not really.  If you look at your object code, you will see that
> the symbols in the anonymous namespace have external linkage.  (But the
> symbol will be mangled with a different random prefix or suffix, or perhaps
> some other unique-ifying technique.)

The symbols have external linkage, but no other file may refer to them.
So, in practice, they can be compiled as though they were file-level
static, and that is what current versions of g++ do.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux