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: mrs at wrs dot com (Mike Stump)
- Date: Wed, 26 Aug 1998 16:50:23 -0700
Your posting to the wrong list. You should be posting to
comp.lang.c++ to ask how to write C++ code, or you can read a good
book on C++. This isn't the right place to get answers.
> Date: Wed, 26 Aug 1998 18:07:45 -0500 (CDT)
> From: Josh Stern <firstname.lastname@example.org>
> To: email@example.com, firstname.lastname@example.org, email@example.com
> However, in my example, the supposedly correct syntax is not
> supported by the current egcs either - i.e. ~Simple() also bombs.
It'll work if you can fix your code (see below).
Here I'll violate the golden rule that says I shouldn't answer...
Did you try this->~Simple()?
Also, your code has other problems with it. Hint, is Simple&
operator=(const Simple& o) a member function (if so, it needs a
declaration in the class).
> this->Simple::~Simple() is accepted.
> One question I have is for the case where the destructor is virtual,
> is there any legal form that will result in a call to the destructor
> of the derived class?
Yes. See any book on C++, or comp.lang.c++, or above.