🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Alexander Krotoff Mon, 18 Mar 1996 23:28
two scope rules questions
#3725
Author: 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                             ]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads