Path: utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!sdd.hp.com!decwrl!ucbvax!agate!darkstar!terra!daniel From: daniel@terra.ucsc.edu (Daniel Edelson) Newsgroups: comp.std.c++ Subject: Re: explicit call to destructor Summary: destructors need not be explicitly qualified Message-ID: <6172@darkstar.ucsc.edu> Date: 20 Aug 90 19:11:33 GMT References: <867@zinn.MV.COM> Sender: usenet@darkstar.ucsc.edu Reply-To: daniel@cis.ucsc.edu (Daniel Edelson) Organization: University of California, Santa Cruz Lines: 30 In article <867@zinn.MV.COM> mjv@objects.mv.com (Michael J. Vilot) writes: >Daniel Edelson points out a change to the grammar: >> [E&S 90] section 12.4 says that when a destructor is >> explicitly called its name must be fully qualified > >The copy of the book I have does not state this restriction anywhere in >section 12.4. The restriction is instead: > ``An explicit call of a destructor must use -> or . explicitly. An > attempt to rely on implicit use of the this pointer would lead to > confusion between the use of the ~ as part of the name of the > destructor and using the unary ~ operator'' >and uses an example on page 279 to illustrate. Page 279 of my book is part of section 12.8, copying objects. Perhaps I have a pre-publication version. In my copy the annotations of section 12.4 contain ``the fully qualified form of the destructor's name must be used to avoid confusion between the use of the ~ as part of the name of the destructor and the unary ~ operator as described in 5.3'' However the document X3J16-0032 contradicts this. I've been told from shopiro@research.att.com that p->~X() is legal, my version of the ARM appears to be pre-publication. >Mike Vilot, ObjectWare Inc, Nashua NH >mjv@objects.mv.com (UUCP: ...!decvax!zinn!objects!mjv) Daniel Edelson daniel@cis.ucsc.edu or sun!practic!peren!daniel (Perennial Software, Inc.)