home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c++:11235 comp.std.c++:897
- Newsgroups: comp.lang.c++,comp.std.c++
- Path: sparky!uunet!taumet!steve
- From: steve@taumet.com (Steve Clamage)
- Subject: Re: Language extensions for run-time type identification
- Message-ID: <1992Jul21.162700.9978@taumet.com>
- Organization: TauMetric Corporation
- References: <TMB.92Jul20182052@arolla.idiap.ch> <1992Jul20.220534.1365@cadsun.corp.mot.com> <14ft2uINNjh4@agate.berkeley.edu>
- Date: Tue, 21 Jul 1992 16:27:00 GMT
- Lines: 21
-
- jbuck@forney.berkeley.edu (Joe Buck) writes:
-
- >* the fact that it is trivial to force any class for which run-time type
- > identification is needed to have a virtual function table (simply add
- > a virtual destructor).
-
- Right.
-
- In cases where you don't want a virtual destructor, you can add a
- dummy do-nothing function. This will force the creation of a
- virtual table without adding any run-time code to object destruction.
-
- class base {
- ...
- protected:
- virtual void no_op(){};
- };
- --
-
- Steve Clamage, TauMetric Corp, steve@taumet.com
- Vice Chair, ANSI C++ Committee, X3J16
-