Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!agate!ig!uwmcsd1!leah!itsgw!sun.soe.clarkson.edu!batcomputer!cornell!deb
From: deb@svax.cs.cornell.edu (David Baraff)
Newsgroups: comp.lang.c++
Subject: Re: classes with no data members
Keywords: sizeof,empty classes,new
Message-ID: <18223@cornell.UUCP>
Date: 11 Jun 88 21:51:48 GMT
References: <464@polari.UUCP> <7943@alice.UUCP> <470@polari.UUCP> <10399@sol.ARPA> <472@polari.UUCP>
Sender: nobody@cornell.UUCP
Reply-To: deb@svax.cs.cornell.edu (David Baraff)
Organization: Cornell Univ. CS Dept, Ithaca NY
Lines: 19

>In article <10399@sol.ARPA>, crowl@cs.rochester.edu (Lawrence Crowl) writes:
> between them without having pointers that point somewhere?  In essence, by
> using a NULL pointer, you have taken away my ability to do:
> 
>     p = new empty ;
>     q = new empty ;
>     if ( p != q ) ....
> 

If 'p' and 'q' have no data in their classes (only functions),
is there any difference between p and q? That is, other than looking
at the addresses (i.e. p != q), is there anyway to tell p and q apart,
in a functional or semantic sense? If not, then the above isn't really
a problem.

Though perhaps if we start discussing derived types, some differences
could arise...

	David Baraff
	deb@svax.cs.cornell.edu