🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: An Extra Virtual Destructor Question t

#3563
From: David Sachs
Date: Fri, 01 Mar 1996 14:57
23 lines
1696 bytes
clamage@Eng.Sun.COM (Steve Clamage) writes:

>The compiler will generate calls to the pure virtual destructor if
>any derived type is destroyed (you can't create objects of type X).
>If you declare a member function, the compiler does not generate it
>for you. Thus, if you declare a pure virtual destructor, you usually
>must implement it as well. 

Do you think it would be a good idea if the standard allowed 
something like:

class X { virtual ~X()=0 {} } // Combined pure virtual + definition 
-- 
***** Listen Americans, the IRS is your taxer,  the IRS is one. *****
David Sachs - Fermilab, HPPC MS369 - P. O. Box 500 - Batavia, IL 60510
Voice: 1 708 840 3942      Deparment Fax: 1 708 840 3785
---
[ To submit articles: try just posting with your news-reader.
                      If that fails, use mailto:std-c++@ncar.ucar.edu
  FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
  Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu.
]
Technical Details
Message-ID: <4h5c92$irn@fsgi01.fnal.gov>
Path: arc1-ca.pugleaf.net!in2.uu.net!bounce-back
References: <4h25rb$43e@news.xs4all.nl> <4h2abb$l69@engnews1.Eng.Sun.COM>

Show Full Headers
Complete Article Headers
From: b91926@fsgi01.fnal.gov (David Sachs)
Message-ID: <4h5c92$irn@fsgi01.fnal.gov>
X-Original-Date: 29 Feb 1996 17:18:58 -0600
Path: arc1-ca.pugleaf.net!in2.uu.net!bounce-back
Date: 01 Mar 96 14:57:20 GMT
Approved: fjh@cs.mu.oz.au
Newsgroups: comp.std.c++
Subject: Re: An Extra Virtual Destructor Question t
Organization: FERMILAB, Batavia, IL
References: <4h25rb$43e@news.xs4all.nl> <4h2abb$l69@engnews1.Eng.Sun.COM>
Reply-To: sachs@fnal.fnal.gov
X-Newsreader: NN version 6.5.0 #9 (NOV)
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBFAgUBMTcQW+EDnX0m9pzZAQGT0gF8DDL6RZ1hSPxQVfmerDooxjQwhKYC1J3W
 p6wj6CxBTHBmXA2ILzm8QXExGottElsK
 =44B7