|FROM ||Ruben Safir
|SUBJECT ||Subject: [NYLXS - HANGOUT] (fwd) Re: Anonymous namespace
|-- forwarded message --
From: "Bo Persson"
Subject: Re: Anonymous namespace
Date: Sat, 4 Jun 2011 11:33:45 +0200
X-Trace: individual.net gOvfFIxUYM4DbDMYEwGYmwySwTqLGqHsgV/IfDW87XUWHO4x/1
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090
X-RFC2646: Format=Flowed; Original
X-Antivirus: avast! (VPS 110603-1, 2011-06-03), Outbound message
Xref: panix comp.lang.c++:1086024
Ruben Safir wrote:
> On Fri, 03 Jun 2011 09:44:29 -0400, Victor Bazarov wrote:
>> The Standard prohibits the use of names with no linkage or names
>> with internal linkage as template arguments. Only objects with
>> external linkage are allowed.
> Victor, you must have written the Bloomberg employment examination.
> What does :Only objects with external linkage are allowed.
> specifically mean? If I create a class and a templated class in
> the same file, is that not internal and no linkage?
The thing with the linkage is that other rules force you to have one
defintion of a type with external linkage. You can't have several with
different meaning. That will make things like vector mean the
same in the whole program.
Types with internal or no linkage would break that and make things
extremely difficult for the linker.
-- end of forwarded message --