This is the mail archive of the
mailing list for the GCC project.
Re: Explicit destructor call unrecognized
- To: egcs-bugs at cygnus dot com, jstern at citilink dot com
- Subject: Re: Explicit destructor call unrecognized
- From: Hyman Rosen <hymie at prolifics dot com>
- Date: Thu, 27 Aug 1998 17:23:00 -0400
Josh Stern (firstname.lastname@example.org) writes:
> According to CD2 at least, ~Simple() should be accepted.
> There is an example in 12.4.13
Untrue. 12.4.13 does not contain any example where a destructor
is called without a pointer. All the examples are of the form
p->~name() or p->name1::~name2().
> I noted when I posted that ~*this had worked on other
> compilers - specifically HP's old cfront-based compiler,
> but I had a doubt about it's current legality.
There's no doubt at all - it's perfectly legal in standard C++.
It's meaning is the application of operator~ to the object.
I can't imagine that it would ever have had any other meaning.