Xref: utzoo comp.lang.c++:12235 comp.std.c++:740 Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!metaphor!dattatri From: dattatri@metaphor.Metaphor.COM (Dattatri) Newsgroups: comp.lang.c++,comp.std.c++ Subject: Explicit Destructor Call Syntax Keywords: X::~X() or ~X()? Message-ID: <2117@metaphor.Metaphor.COM> Date: 15 Mar 91 00:47:48 GMT Organization: Metaphor Computer Systems, Mountain View, CA Lines: 16 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