This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Explicit destructor call unrecognized


Josh Stern (jstern@citilink.com) 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]