From 8434439112664731050
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,c9300cc6a0b28243
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2003-08-05 18:51:33 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull
From: andys@despammed.com (Andy Sawyer)
Newsgroups: comp.std.c++
Subject: Re: no_base_call
Date: Wed, 6 Aug 2003 01:51:29 +0000 (UTC)
Organization: International Rescue
Lines: 37
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <he4wx996.fsf@evo6.com>
References: <_azXa.385380$jp.11007710@twister.southeast.rr.com> <memo.20030804224451.61301B@brangdon.madasafish.com>
 <a4OXa.321878$nr.13166846@twister.southeast.rr.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: mail2news.demon.co.uk 1060134689 14975 10.0.0.1 (6 Aug 2003 01:51:29 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Wed, 6 Aug 2003 01:51:29 +0000 (UTC)
X-Received: from mulga.cs.mu.oz.au ([128.250.1.22])
	by news.demon.co.uk with esmtp (Exim 4.12)
	id 19kDSa-0003tO-00
	for mail2news@news.news.demon.net; Wed, 06 Aug 2003 01:51:28 +0000
X-Received: by mulga.cs.mu.OZ.AU
	id LAA20283; Wed, 6 Aug 2003 11:51:22 +1000 (EST)
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Path: comp-std-cpp-robomod!not-for-mail
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Delivered-To: std-c++@ucar.edu
X-Newsgroups: comp.std.c++
X-DDate: Boomtime, Day 71 of the season of Confusion, Anno Mung 3169
X-DoML: 14215
X-Attribution: AMS
X-URL: http://www.evo6.com
X-Face: 42Hn/fXjnx=kF5rNLj5)x7OM+-gqu*;\h"^gD}VRl+K;$lV<n=q++!+~(4U:A&U{If*>i/s
 G&,r!F_f>a[0&]+'}`%vo'"3d}U^Z5z`M(n2G5T(,,mQeJNx~tsLDO_BBpjH4?c~A`qi)*k7fq!W4|
 wZFKeB/=gY(kb0O=0!m?,`to)l;_Ux%<D]L<o\0>)L<nzAXV;*=GtaKf|C5Q"hsk\d)fm['C:"n[4o
 */L;0uY.R*1e=eOt78@Y
X-Cancel-Lock: sha1:TZH5M0oYCnqF8CXbLoQVXIi2Rkk=
X-User-Agent: Gnus v5.10.2/XEmacs
X-NNTP-Posting-Date: Tue, 05 Aug 2003 19:11:20 BST
X-Spam-Status: No, hits=-5.5 required=5.0
	tests=AWL,BAYES_01,MAILTO_TO_REMOVE,QUOTED_EMAIL_TEXT,REFERENCES,
	      USER_AGENT
	version=2.55
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
Xref: archiver1.google.com comp.std.c++:20486

In article <a4OXa.321878$nr.13166846@twister.southeast.rr.com>,
 on Tue, 5 Aug 2003 14:39:02 +0000 (UTC),
 no_spam_remove_up_to_here_jwilliams@mfchelp.com ("Jeff Williams") wrote:

> If the base class version was private, then the derived classes would
> not be able to over-ride the function anyways.

Why on earth not?

If you REALLY want to ensure that no derived class can call your base
class implementation, you could write something like:

class base
{
public:
   virtual void foo()
   {
     assert( typeid( *this ) == typeid( base ) );
   }
};

Although obviously, it's a run-time check rather than a compile-time
check.

Regards,
 Andy S
-- 
"Light thinks it travels faster than anything but it is wrong. No matter
 how fast light travels it finds the darkness has always got there first,
 and is waiting for it."                  -- Terry Pratchett, Reaper Man

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



