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


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 <jstern@citilink.com>
> To: egcs-bugs@cygnus.com, jstern@citilink.com, mrs@wrs.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.


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