home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / cplus / 18916 < prev    next >
Encoding:
Internet Message Format  |  1993-01-10  |  804 b 

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!news.cerf.net!nic.cerf.net!hlf
  2. From: hlf@nic.cerf.net (Howard Ferguson)
  3. Newsgroups: comp.lang.c++
  4. Subject: Preventing inheritance
  5. Date: 11 Jan 1993 04:40:25 GMT
  6. Organization: CERFnet Dial n' CERF Customer Group
  7. Lines: 10
  8. Message-ID: <1iqtnpINN283@news.cerf.net>
  9. NNTP-Posting-Host: nic.cerf.net
  10.  
  11.  
  12. If I create a class which I am supplying to other users, how do I
  13. make sure that they do not inherit from it ever. I could overload new
  14. and check the size of the object that is being allocated, but there
  15. are two catchs. The first minor one is that this is a run-time check,
  16. and it would be far preferable to catch this sort of thing at compile
  17. time. More seriously, they could over-ride the new operator and by-pass
  18. the check.
  19.     yours totally paranoid,
  20.             hlf
  21.