🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #3725

two scope rules questions

#3725
From: Alexander Krotoff
Date: Mon, 18 Mar 1996 23:28
42 lines
2027 bytes
Hello, c++ gurus.

I have 2 questions about scope rules.

The first one: if typedef-name names unnamed class, it became class-name.
Is it typedef-name also ?

Example:
enum en {
	X =1;
};

typedef class {
	int a;
} X;

X becomes class-name.
If it is typedef-name also, this example is not well-formed. 
If if is not typedef-name, the example is well-formed, but,
since we cannot use `class X' this class name is always hidden
by enumerator name and could not be accessed.

The second question: in ARM (9.9) and in early versions of WP
(Feb 11, 1991) it was a section "Local type names" with few
wery puzzling examples (example 2 in the WP 1991). The current
edition of the section is much shorter, and do not cover examples
from ARM. Are these rules deleted, or just moved to any general
section ? Are examples from ARM still be incrorrect according to
current WP ?

Thank you in advance.

--
Alexander N. Krotoff		krotoff@such.srcc.msu.su
Research Computer Center	tel: +7(095)939-2638
Moscow State University		fax: +7(095)939-4430
---
[ 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         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
Technical Details
Message-ID: <199603181242.PAA14998@boy.nmd.msu.ru>
Path: arc1-ca.pugleaf.net!in2.uu.net!bounce-back

Show Full Headers
Complete Article Headers
From: Alexander Krotoff <krotoff@boy.nmd.msu.ru>
Message-ID: <199603181242.PAA14998@boy.nmd.msu.ru>
X-Original-Date: Mon, 18 Mar 1996 15:42:37 +0300
Path: arc1-ca.pugleaf.net!in2.uu.net!bounce-back
Date: 18 Mar 96 23:28:27 GMT
Approved: fjh@cs.mu.oz.au
Subject: two scope rules questions
Newsgroups: comp.std.c++
Organization: Research Computer Center, Moscow State University
Reply-To: krotoff@such.srcc.msu.su
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBFAgUBMU3xo+EDnX0m9pzZAQF3JgF+LLfGLcqzBIbQYQq8A8C3mUPLzVrd0i4h
 W9ZngqCCl+NfhWWWUnC7Yvj7dHdRpOpN
 =1y52