Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news.nobody.at!texta.sil.at!news-zh.switch.ch!kanaga.switch.ch!switch.ch!newsfeed-00.mathworks.com!panix!not-for-mail From: Ruben Safir Newsgroups: comp.lang.c++ Subject: Re: Anonymous namespace Date: Sat, 4 Jun 2011 05:05:59 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 28 Message-ID: References: <94rjavFbjiU7@mid.individual.net> NNTP-Posting-Host: www2.mrbrklyn.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: reader1.panix.com 1307163959 20952 96.57.23.82 (4 Jun 2011 05:05:59 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Sat, 4 Jun 2011 05:05:59 +0000 (UTC) X-Blackjet: Blackjet is a Yankee Fan X-DRMisTHEFT: Use GNU Linux today X-From: A Dark Cloud X-LOCATION: Brooklyn NY - Forget abou' it! X-NYLXS: Really - yah think computers are supposed to be broken? User-Agent: Pan/0.133 (House of Butterflies) Xref: x330-a1.tempe.blueboxinc.net comp.lang.c++:6171 On Fri, 03 Jun 2011 20:12:15 +1200, Ian Collins wrote: > >> >> please expand? > > One way to look at the anonymous namespace is to consider it a namespace > with a cryptic name. That name is only known within the current > compilation unit. Thus anything declared within the namespace can't > been seen elsewhere because the namespace name is unknown. > > So I could write > > namespace { int n; } > > and n would only be visible within the current compilation unit whereas > > int n; > > would be globally visible. Ok - I'm getting a clearer picture. What specifically did you mean, however, by the phrase "even if they should have external linkage" This is why I wanted a job with a lot of smart C++ coders. I'd sweep the floor if need be. Ruben.