MESSAGE
DATE | 2011-06-05 |
FROM | Ruben Safir
|
SUBJECT | Subject: [NYLXS - HANGOUT] (fwd) Re: Anonymous namespace
|
-- forwarded message -- Path: reader1.panix.com!panix!newsfeed-00.mathworks.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Bo Persson" Newsgroups: comp.lang.c++ Subject: Re: Anonymous namespace Date: Sat, 4 Jun 2011 11:33:45 +0200 Lines: 29 Message-ID: <94ucfdFv9lU1-at-mid.individual.net> References: <03464db0-e118-463c-9834-171dab457e42-at-h9g2000yqk.googlegroups.com> X-Trace: individual.net gOvfFIxUYM4DbDMYEwGYmwySwTqLGqHsgV/IfDW87XUWHO4x/1 Cancel-Lock: sha1:ZAyIMlnEKjNr/t25mI2dyouyAf8= X-Priority: 3 X-MSMail-Priority: Normal 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 X-Antivirus-Status: Clean 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.
Bo Persson
-- end of forwarded message --
|
|