home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / cplus / 11235 < prev    next >
Encoding:
Text File  |  1992-07-21  |  1.0 KB  |  33 lines

  1. Xref: sparky comp.lang.c++:11235 comp.std.c++:897
  2. Newsgroups: comp.lang.c++,comp.std.c++
  3. Path: sparky!uunet!taumet!steve
  4. From: steve@taumet.com (Steve Clamage)
  5. Subject: Re: Language extensions for run-time type identification
  6. Message-ID: <1992Jul21.162700.9978@taumet.com>
  7. Organization: TauMetric Corporation
  8. References: <TMB.92Jul20182052@arolla.idiap.ch> <1992Jul20.220534.1365@cadsun.corp.mot.com> <14ft2uINNjh4@agate.berkeley.edu>
  9. Date: Tue, 21 Jul 1992 16:27:00 GMT
  10. Lines: 21
  11.  
  12. jbuck@forney.berkeley.edu (Joe Buck) writes:
  13.  
  14. >* the fact that it is trivial to force any class for which run-time type
  15. >  identification is needed to have a virtual function table (simply add
  16. >  a virtual destructor).
  17.  
  18. Right.
  19.  
  20. In cases where you don't want a virtual destructor, you can add a
  21. dummy do-nothing function.  This will force the creation of a
  22. virtual table without adding any run-time code to object destruction.
  23.  
  24. class base {
  25.     ...
  26. protected:
  27.     virtual void no_op(){};
  28. };
  29. -- 
  30.  
  31. Steve Clamage, TauMetric Corp, steve@taumet.com
  32. Vice Chair, ANSI C++ Committee, X3J16
  33.