Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!oresoft!dan From: dan@oresoft.uu.net (Daniel Elbaum) Newsgroups: comp.lang.c++ Subject: Re: enums declared in class scope Message-ID: <1990Jan9.232522.3215@oresoft.uu.net> Date: 9 Jan 90 23:25:22 GMT References: <10210@saturn.ucsc.edu> Reply-To: dan@oresoft.uu.net (Daniel Elbaum) Organization: Oregon Software, Portland, OR Lines: 24 In article <10210@saturn.ucsc.edu> daniel@saturn.ucsc.edu (Daniel Edelson) writes: :It says in section 3.2 of the c++ 2.0 reference that :the name of an enumeration type declared in class scope :belongs to the enclosing scope. What about the names of :the enumerators, what scope do they belong to? :Cfront 2.0 and G++ says the enumerators have class scope, :while Oregon C++ says the enumerators have the same scope :as the enumeration type. :daniel :daniel@cis.ucsc.edu The enumerators have class scope and can be used outside of the class only by qualifying the enumerator with the class name. This overly generous scoping is a bug in occ version 1.2 which we hope to have fixed by the upcoming release of 2.0. -- Perl: the Whack-A-Mole of programming lanugages. ({uunet,tektronix,reed,sun!nosun,osu-cis,psu-cs}!oresoft!(dan)@oresoft.uu.net)