From 5316305602940206564
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,e422f6e841d07a08
X-Google-Attributes: gidf78e5,public
From: maxtal@Physics.usyd.edu.au (John Max Skaller)
Subject: Re: "Subclassing" Enums
Date: 1995/03/30
Message-ID: <D69onn.Hn0@ucc.su.OZ.AU>#1/1
X-Deja-AN: 100543938
sender: news@ucc.su.OZ.AU
references: <3l72bh$8tf@crchh299.bnr.ca> <3l75on$b9l@engnews2.Eng.Sun.COM>
organization: School of Physics, University of Sydney, Australia
newsgroups: comp.std.c++

In article <3l75on$b9l@engnews2.Eng.Sun.COM>,
Steve Clamage <clamage@Eng.Sun.COM> wrote:
>
>The new rule about const static members makes these work even more like
>enums in classes, including having class scope:
>
>	class base {
>		enum error_code { informational=0, warning=1000,
>				  error=2000, fatal=3000 };
>	};
>
>	class derived : public base {
>		static const error_code weekday = 100;
>		...
>	};

	Yeah. Except you still have to write:

	const error_code derived::weekday;

somewhere (anyhwere!). 

	I think this was not one of the better extensions.
 
--
        JOHN (MAX) SKALLER,         INTERNET:maxtal@suphys.physics.su.oz.au
	Maxtal Pty Ltd,		    
        81A Glebe Point Rd, GLEBE   Mem: SA IT/9/22,SC22/WG21 
        NSW 2037, AUSTRALIA	    Phone: 61-2-566-2189



