Silly question

Steven Schveighoffer schveiguy at yahoo.com
Thu Apr 24 06:36:55 PDT 2008


"Jarrett Billingsley" wrote
> "janderson" wrote
>> They are however in my book this is plain wrong.  The whole purpose of 
>> being able to hide abstraction layers is broken.  I should be able to 
>> protect inherited functions from objects that work on that level.  Its a 
>> fundamental principle in C++.
>
> What?
>
> Am I the only one who can't understand what this post means?


I'm not sure, but I think he's talking about private base classes.  Where 
all the base class' functions are private in a derived class.  Other than 
that, I don't see how you could override a virtual function and make it 
private...

But thanks for your experiment, I didn't really know how to do that kind of 
a test :)

For some reason my brain wasn't working yesterday.  I found this in the docs 
(http://www.digitalmars.com/d/1.0/function.html) today:

"All non-static *non-private* non-template member functions are virtual"

Sorry for the noise...

-Steve 




More information about the Digitalmars-d-learn mailing list