home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pmafire!news.dell.com!natinst.com!cs.utexas.edu!sun-barr!olivea!bu.edu!att!att!allegra!alice!ark
- From: ark@alice.att.com (Andrew Koenig)
- Newsgroups: comp.lang.c++
- Subject: Re: zero-length datatype
- Message-ID: <23661@alice.att.com>
- Date: 13 Sep 92 15:19:04 GMT
- References: <23654@alice.att.com> <1992Sep11.185505.17536@cadsun.corp.mot.com> <23659@alice.att.com> <TMB.92Sep12212903@arolla.idiap.ch>
- Reply-To: ark@alice.UUCP ()
- Distribution: comp
- Organization: AT&T Bell Laboratories, Murray Hill NJ
- Lines: 20
-
- In article <TMB.92Sep12212903@arolla.idiap.ch> tmb@idiap.ch writes:
-
- > Well, it might be good to remain compatible, in the sense that every
- > object that has non-zero size in ISO C also have a non-zero size in
- > C++. However, since there are no objects of type "void" (or of some
- > other, newly introduced, distinguished type with zero size) in ISO C,
- > there can't be any harm in letting objects of this new type have zero
- > size: the behavior of existing code would not be affected.
-
- That is not quite true, especially in the presence of templates.
-
- I expect that there will be some committee members who will say
- that they want to be able to assume that objects of any type at all
- are nonzero in size and admitting a new empty type would violate
- that assumption. And indeed it might even affect old C code, if that
- code uses a type that is macro-expanded into something not known until
- the code is actually compiled.
- --
- --Andrew Koenig
- ark@europa.att.com
-