🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.programmer.codewarrior
Article #1128

unnamed namespaces in CW5.3

#1128
From: Adin Hunter Baber
Date: Wed, 24 Oct 2001 04:38
32 lines
1841 bytes
I was trying to put some classes in an unnamed namespace.  The classes 
provide some extra functionality in that header, and don't need to be 
used outside of it.  however, I am finding that I am able to create 
instances of these classes inside my main function.

Is this an error in CW5.3?  Is it fixed in CW7?



This compiles fine:

file: somestuff.h
namespace /*unnamed*/
   {
   class Stuff
      {...};
   }



#include "somestuff.h"
int main()
   {
   Stuff myStuff; // I don't think I should be able to do this
   return 0;
   };

-- 
Adin Hunter Baber
"Death is lighter than a feather, Duty heavier than a mountain"
"...nevertheless, they fought on even though their homes were piles of ashes,
even though they knew they could not win they still fought on,..."
Technical Details
Message-ID: <mjolnir_DELETE_-8A9595.23380323102001@east.usenetserver.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sjcppf01.usenetserver.com!e420r-sjo4.usenetserver.com!usenetserver.com!atlpnn01.usenetserver.com.POSTED!mjolnir_DELETE_

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f635e,426dc3c68e8241c3,start
X-Google-Attributes: gidf635e,public
X-Google-Thread: 10bcce,426dc3c68e8241c3,start
X-Google-Attributes: gid10bcce,public
X-Google-ArrivalTime: 2001-10-23 21:42:05 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sjcppf01.usenetserver.com!e420r-sjo4.usenetserver.com!usenetserver.com!atlpnn01.usenetserver.com.POSTED!mjolnir_DELETE_
From: Adin Hunter Baber <mjolnir_DELETE_@soltec.net>
Newsgroups: comp.sys.mac.programmer.codewarrior,codewarrior.mac
Subject: unnamed namespaces in CW5.3
Organization: Soltec
User-Agent: MT-NewsWatcher/3.1 (PPC)
Message-ID: <mjolnir_DELETE_-8A9595.23380323102001@east.usenetserver.com>
Lines: 32
X-Complaints-To: abuse@usenetserver.com
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly.
NNTP-Posting-Date: Wed, 24 Oct 2001 00:36:40 EDT
Date: Tue, 23 Oct 2001 23:38:19 -0500