Xref: utzoo comp.lang.c++:12270 comp.std.c++:744 Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!linac!att!ucbvax!ulysses!ulysses.att.com!mwb From: mwb@ulysses.att.com (Michael W. Balk) Newsgroups: comp.lang.c++,comp.std.c++ Subject: Re: Explicit Destructor Call Syntax Keywords: X::~X() or ~X()? Message-ID: <14478@ulysses.att.com> Date: 16 Mar 91 23:48:02 GMT References: <2117@metaphor.Metaphor.COM> Sender: netnews@ulysses.att.com Followup-To: comp.lang.c++ Lines: 23 In article <2117@metaphor.Metaphor.COM>, dattatri@metaphor.Metaphor.COM (Dattatri) writes: > Here is something weird with my compiler when I use an explicit call > to a destructor. > As per Pg 279 of the ARM, the syntax "this->~X()" or object.~X()" are > both valid calls to the destructor, and to explicitly use a direct call > (bypassing the virtual function mechanism) "object.X::~X()". > > However the compiler that I'm using rejects this->~X() and object.~X() and > accepts this->X::~X() and object.X::~X(). > > I've used same code shown in the ARM. I have encountered the same problem using cfront R2.1. Recently (December) Bjarne posted an errata list for the ARM to this newsgroup, but it makes no mention of any corrections to page 279. Maybe in R3? Michael W. Balk AT&T Bell Laboratories Murray Hill, NJ 07974 mwb@ulysses.att.com