From -115145281032394802
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,ccb40040597f37a7
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2003-03-06 13:55:11 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!diablo.theplanet.net!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull
From: kgwzamboni-news@zambonistiscan.com
Newsgroups: comp.std.c++
Subject: Re: Extending enums (was Re: Forward declaration of enum)
Date: Thu, 6 Mar 2003 21:55:10 +0000 (UTC)
Organization: Solution Technology
Lines: 21
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <PNE21WKuwwiy-pn2-dMoOpvv8cPkQ@zamboni.stiscan.com>
References: <pOqblMCSSSX+Ewcy@robinton.demon.co.uk> <memo.20030302145753.26945C@brangdon.madasafish.com> <m3n0kdt4cg.fsf@uniton.integrable-solutions.net> <mKY8a.1209$U24.78230781@newssvr21.news.prodigy.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 8bit
X-Trace: mail2news.demon.co.uk 1046987710 12361 10.0.0.1 (6 Mar 2003 21:55:10 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Thu, 6 Mar 2003 21:55:10 +0000 (UTC)
X-Received: from mulga.cs.mu.oz.au ([128.250.1.22])
	by news.demon.co.uk with esmtp (Exim 4.05)
	id 18r3KW-0003DE-00
	for mail2news@news.news.demon.net; Thu, 06 Mar 2003 21:55:08 +0000
X-Received: from localhost (localhost [[UNIX: localhost]]) by mulga.cs.mu.OZ.AU
	id IAA12051; Fri, 7 Mar 2003 08:35:50 +1100 (EST)
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Path: comp-std-cpp-robomod!not-for-mail
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Delivered-To: std-c++@ncar.ucar.edu
X-Newsgroups: comp.std.c++
X-User-Agent: ProNews/2 V1.52.cp012
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.
X-NNTP-Posting-Date: Thu, 06 Mar 2003 12:34:37 EST
X-Spam-Status: No, hits=-8.9 required=5.0
	tests=NOSPAM_INC,NO_REAL_NAME,REFERENCES,SIGNATURE_SHORT_DENSE,
	      SPAM_PHRASE_00_01,USER_AGENT
	version=2.41
Xref: archiver1.google.com comp.std.c++:18217

On Tue, 4 Mar 2003 16:45:34 UTC, nagle@animats.com (John Nagle) wrote:
How about also making them more like real types.

enum Color( Red, Orange, Yellow );
enum Fruit( Orange, Apple, Grapes );

Except when assigning them directly to ints, the compiler is capable
of determining which Orange it is.
For that case allow the cast like Color(Orange).

Then dumb things like "Color x = Grapes;" would be flaged.
-- 
Remove zamboni to reply.
All the above is hearsay and the not quaranteed.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



