This is the mail archive of the
mailing list for the GCC project.
Re: Static linkage and anonymous namespace
>>>>> Martin von Loewis <email@example.com> writes:
>> 2) The whole point of the anonymous namespace is to allow file-local
>> things to be used in situations where a name with external linkage is
>> required; for example, in template arguments.
> I don't understand this point (didn't the last time). What code would
> not compile anymore that currently does?
I can't think of any examples offhand that the compiler currently supports,
but passing the address of a variable in the unnamed namespace to an
exported template would break. I'd like not to have to change this back
when we implement export.