From 2487791652927467088
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,17221ee87fa64d29
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1993-03-09 07:04:03 PST
Newsgroups: comp.std.c++
Path: sparky!uunet!titan!lpi!pkt
From: pkt@lpi.liant.com (Scott Turner)
Subject: Re: useless declarations
Message-ID: <1993Mar9.135445.23786@lpi.liant.com>
Sender: pkt@lpi (Scott Turner)
Organization: Liant Software Corporation
References:  <1ng5q8INNeu0@darkstar.UCSC.EDU>
Date: Tue, 9 Mar 1993 13:54:45 GMT
Lines: 24

In article <1ng5q8INNeu0@darkstar.UCSC.EDU>, daniel@cse.ucsc.edu (Daniel R. Edelson) writes:
> Does the draft standard discuss  useless nested classes?
> I.e., classes that don't declare anything, neither a tag
> nor an object.

No.  The closest it comes to that is to retain the words of the ARM
"The member-declarator-list can be omitted only after a class-specifier, an 
enum-specifier, or a decl-specifier-seq of the form friend
elaborated-type-specifier".  (The names of the grammar symbols have been
changed for editorial reasons.)

> 	struct outer {
> 		struct {
> 		    static int y;
> 		};
> 	};

This example is not legal because it's impossible to satisfy the 
requirement of defining the static member y.
--
Prescott K. Turner, Jr.
Liant Software Corp. (developers of LPI languages)
959 Concord St., Framingham, MA 01701 USA    (508) 872-8700
UUCP: uunet!lpi!pkt                          Internet: pkt@lpi.liant.com


