dattatri@metaphor.Metaphor.COM (Dattatri) (03/15/91)
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. Did anything change in the standard after the ARM was published? Thanks in advance Kayshav -- dattatri@metaphor.com
mwb@ulysses.att.com (Michael W. Balk) (03/17/91)
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