🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Compiler should generate virtual destructors

#1409
From: Donald W. Rouse II
Date: Wed, 06 Jan 1993 19:12
12 lines
1126 bytes
In article <lkc2k7INNajv@exodus.Eng.Sun.COM> db@argon.Eng.Sun.COM (David Brownell) writes:
>   (2a)	C++ compilers don't automagically generate ANYTHING for classes
>	any more:  constructors, destructors, assignment and address-of
>	operators, etc.  If such routines are used but not declared and
>	defined, that is an error.
>

The problem with this is that struct == class with all members public.
This would break much C code.
Better would be for the compiler not to generate default stuff
if _any_ constructor or destructor (or op=) is declared for a class;
elsewise, generate if nec.
Technical Details
Message-ID: <1993Jan6.191259.20436@cci632.cci.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!howland.reston.ans.net!sol.ctr.columbia.edu!usc!cs.utexas.edu!swrinde!gatech!udel!rochester!rit!cci632!dwr
References: <1992Dec31.050150.28929@ucc.su.OZ.AU> <lkc2k7INNajv@exodus.Eng.Sun.COM>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c++
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!howland.reston.ans.net!sol.ctr.columbia.edu!usc!cs.utexas.edu!swrinde!gatech!udel!rochester!rit!cci632!dwr
From: dwr@cci632.cci.com (Donald W. Rouse II)
Subject: Re: Compiler should generate virtual destructors
Message-ID: <1993Jan6.191259.20436@cci632.cci.com>
Organization: [Computer Consoles, Inc., Rochester, NY
References: <1992Dec31.050150.28929@ucc.su.OZ.AU> <lkc2k7INNajv@exodus.Eng.Sun.COM>
Date: Wed, 6 Jan 1993 19:12:59 GMT
Lines: 12