|FROM ||Ruben Safir
|SUBJECT ||Subject: [NYLXS - HANGOUT] (fwd) Re: Anonymous namespace
|-- forwarded message --
From: Ian Collins
Subject: Re: Anonymous namespace
Date: Sat, 04 Jun 2011 17:45:32 +1200
Content-Type: text/plain; charset=UTF-8; format=flowed
X-Trace: individual.net 6EmqTDYwEWgYCUQTr00/jQG/nW2eOYf7duvQl6Fxs1L9i7PtTp
User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:188.8.131.52) Gecko/20101021 Lightning/1.0b2 Thunderbird/3.1.4
Xref: panix comp.lang.c++:1086020
On 06/ 4/11 05:39 PM, Ruben Safir wrote:
> On Sat, 04 Jun 2011 17:32:38 +1200, Ian Collins wrote:
>>> Yes - I've seen the compiler through that error are me. Why?
>> Because you can't, the language doesn't allow it.
> I thought I'd get that answer. :) Rephrase. Why did the C++ designers
> chose to prevent static types.
I guess because C doesn't have them. Also types don't have any linkage.
Linkage applies to instances of types. The language rules state that
if a class is declared in more than one compilation unit, the
definitions must be identical. The anonymous namespace works around
-- end of forwarded message --