Topic: An Extra Virtual Destructor Question to Ponder
Author: "john (j.d.) hickin" <hickin@bnr.ca>
Date: 1995/11/09 Raw View
Now that the standard has carefully specified what virtual functions run when
called from constructors/destructors in objects with multiple inheritance it
becomes possible to allow the following:
class X { public: X(); virtual ~X() = 0; };
Has this been considered?
--
John Hickin Bell-Northern Research, Montreal, Quebec
(514) 765-7924 hickin@bnr.ca
---
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Author: kanze@gabi-soft.fr (J. Kanze)
Date: 1995/11/10 Raw View
john (j.d.) hickin (hickin@bnr.ca) wrote:
|> Now that the standard has carefully specified what virtual functions run when
|> called from constructors/destructors in objects with multiple inheritance it
|> becomes possible to allow the following:
|> class X { public: X(); virtual ~X() = 0; };
|> Has this been considered?
In what way? This has always been legal, and I see nothing in the
present draft to change it. I occasionally use the idiom to force a
class to be abstract even when I want to provide default behavior for
all of the member functions.
Of course, you do still have to provide an implementation of the
destructor somewhere.
--
James Kanze (+33) 88 14 49 00 email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs Bourgeois, 67000 Strasbourg, France
Conseils, tudes et r alisations en logiciel orient objet --
-- A la recherche d'une activit dans une region francophone
---
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]