Xref: utzoo comp.lang.c++:11620 comp.std.c++:593 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!linus!linus!mwunix.mitre.org!palmer From: palmer@mwunix.mitre.org (Forrest Palmer) Newsgroups: comp.lang.c++,comp.std.c++ Subject: Use of class-declared enums outside of that class Keywords: enum, class Message-ID: Date: 13 Feb 91 19:30:55 GMT Sender: news@linus.mitre.org (News Service) Organization: The MITRE Corporation Lines: 41 Nntp-Posting-Host: mwunix.mitre.org Hi, This example is based on one given in the ARM pp. 240-241 : class X { public: enum E2 { a2, b2 }; X() {} } ; main () { X::E2 e2 = X::a2 ; } With Sun C++ 2.0 I get the error messages : "Ctest.C", line 10: error: `;' missing after statement "Ctest.C", line 10: error: syntax error With G++ 1.37 I get : Ctest.C: In function int main (): Ctest.C:10: field `E2' is not a member of type `X' Ctest.C:10: parse error before `e2' 2 errors My question is - are these responses bugs and if so are they known bugs? Thanks, -- Forrest Palmer (703) 883-5668 The MITRE Corp. - Washington Center MS W425, McLean, VA 22102 palmer@mitre.org -- Forrest Palmer (703) 883-5668 The MITRE Corp. - Washington Center MS W425, McLean, VA 22102 palmer@mitre.org