home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!taumet!steve
- From: steve@taumet.com (Steve Clamage)
- Subject: Re: Calling pure virtual functions in base class constructor
- Message-ID: <1992Nov20.184142.26362@taumet.com>
- Organization: TauMetric Corporation
- References: <721505557snx@trmphrst.demon.co.uk> <1992Nov19.170810.22728@ucc.su.OZ.AU>
- Date: Fri, 20 Nov 1992 18:41:42 GMT
- Lines: 25
-
- maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
-
- |In article <721505557snx@trmphrst.demon.co.uk> nikki@trmphrst.demon.co.uk writes:
- |>
- |>Sorry about the length of this posting, but I really would like to
- |>understand the reasons for all this :-)
-
- | I suspect it is a quirk. To ban or not to ban a body for
- |a pure virtual? Bjarne chose to allow them. I now see and accept that
- |apart from some unrelated meaning for the body, some 'default' behaviour
- |or, better, 'core' behaviour might well be a good use.
-
- Consider this: An abstract base class may have a pure virtual
- destructor. The destructor for that base class will be called when
- a derived object is destroyed. Therefore, you must provide a
- definition for the pure virtual destructor.
-
- The alternative would have been for the language to forbid pure virtual
- destructors, or to have special rules for them. It seems simpler to
- allow a definition of a pure virtual function. It cannot cause any
- difficulties, and is necessary or desirable in some cases.
- --
-
- Steve Clamage, TauMetric Corp, steve@taumet.com
- Vice Chair, ANSI C++ Committee, X3J16
-