From -3898687989589959673
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,c9300cc6a0b28243
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2003-08-08 16:29:34 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!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: Fri, 8 Aug 2003 23:29:33 +0000 (UTC)
Organization: International Rescue
Lines: 43
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <8yq5ukpm.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>
 <he4wx996.fsf@evo6.com> <vj0oskcg324hce@corp.supernews.com>
 <u18uwee9.fsf@evo6.com> <vj3m8nq803t7ac@corp.supernews.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: mail2news.demon.co.uk 1060385373 25141 10.0.0.1 (8 Aug 2003 23:29:33 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Fri, 8 Aug 2003 23:29:33 +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 19lGfr-0006XM-00
	for mail2news@news.news.demon.net; Fri, 08 Aug 2003 23:29:32 +0000
X-Received: from localhost (localhost [[UNIX: localhost]]) by mulga.cs.mu.OZ.AU
	id JAA09293; Sat, 9 Aug 2003 09:29:29 +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: Setting Orange, Day 1 of the season of Bureaucracy, Anno Mung 3169
X-DoML: 14218
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:udx+HgUwtDJEsEoEC9WU82aIlGA=
X-User-Agent: Gnus v5.10.2/XEmacs
X-NNTP-Posting-Date: Fri, 08 Aug 2003 00:08:24 BST
X-Spamscanner: mailbox3.ucsd.edu  (v1.2 May 26 2003 01:55:38, -1.0/5.0 2.55)
X-MailScanner: PASSED (v1.2.7 59298 h77N8QJf093939 mailbox3.ucsd.edu)
X-Spam-Status: No, hits=-5.3 required=5.0
	tests=AWL,BAYES_01,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++:20532

In article <vj3m8nq803t7ac@corp.supernews.com>,
 on Thu, 7 Aug 2003 04:52:46 +0000 (UTC),
 sebmol@yahoo.com ("Sebastian Moleski") wrote:

> "Andy Sawyer" <andys@despammed.com> wrote in message
> news:u18uwee9.fsf@evo6.com...
>> > Um, if the virtual function is private in the base class, the derived
>> > class can't call the base class implementation either. No need to
>> > resort to run-time kludges.
>>
>> Sure, but the OP seemd to object to the private virtual function
>> approach. And, presumably, the private virtual function would be
>> accessible indirectly via a call to some public or protected function?
>> (A virtual function which cannot be called *at all* seems a little
>> pointless to me)
>
> You basically get the template method pattern through private virtual
> functions.

Which was kind of my point. (It's rare for me to declare a virtual
function as public).

> So, yes, of course those private virtual functions can be called
> through the public or protected class interface but not directly.

And it was my understanding that the OP wanted to prevent the base-class
function being called by a derived class function - and if the derived
class function calls one of those public or protected members...


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                       ]



