🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #2507

Re: An Extra Virtual Destructor Question to Ponder

#2507
From: J. Kanze
Date: Fri, 10 Nov 1995 19:17
28 lines
1592 bytes
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. ]
Technical Details
Message-ID: <47voa1$969@gabi.gabi-soft.fr>
Path: arc1-ca.pugleaf.net!128.32.155.1!matt
References: <47t2s1$ivm@bmtlh10.bnr.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!128.32.155.1!matt
From: kanze@gabi-soft.fr (J. Kanze)
Newsgroups: comp.std.c++
Subject: Re: An Extra Virtual Destructor Question to Ponder
Date: 10 Nov 1995 19:17:40 GMT
Organization: GABI Software, Sarl.
Approved: matt@physics2.Berkeley.EDU (Matt Austern)
Message-ID: <47voa1$969@gabi.gabi-soft.fr>
References: <47t2s1$ivm@bmtlh10.bnr.ca>
NNTP-Posting-Host: physics2.berkeley.edu