home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.std.c++
- Path: 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
-
- 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.
-