home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!wupost!sdd.hp.com!uakari.primate.wisc.edu!usenet.coe.montana.edu!rpi!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: <23658@alice.att.com>
- Date: 12 Sep 92 15:51:36 GMT
- References: <TMB.92Sep8141523@arolla.idiap.ch> <4947@holden.lulea.trab.se> <HAYDENS.92Sep9215705@bullwinkle.juliet.ll.mit.edu> <TMB.92Sep10120206@arolla.idiap.ch> <23650@alice.att.com> <TMB.92Sep11211332@arolla.idiap.ch>
- Reply-To: ark@alice.UUCP ()
- Distribution: comp
- Organization: AT&T Bell Laboratories, Murray Hill NJ
- Lines: 20
-
- In article <TMB.92Sep11211332@arolla.idiap.ch> tmb@idiap.ch writes:
-
- > To remain compatible with C, you can interpret the above prototype as
- > meaning either "a function taking no arguments" or as "a function
- > taking exactly one argument of type 'void'". That is, it would be
- > legal to call the above function as "f()" or "f(void())". Since there
- > is no actual data being passed and no actual dereferencing happening,
- > this is harmless.
-
- No it's not harmless. For example, consider overloading:
-
- extern void f();
- extern void f(T);
-
- If T happens to be void, is this just a redeclaration of the same f?
- I'm presuming that I want to be able to define f without knowing the
- identity of type T.
- --
- --Andrew Koenig
- ark@europa.att.com
-