Re: subclassing question
- From: "Alex Blekhman" <tkfx.REMOVE@xxxxxxxxx>
- Date: Sun, 2 Nov 2008 16:08:10 +0200
"robbio" wrote:
So, if your example is right, then by default
A::SomeFunction(...) is private to class A, and class B never
see the A::Some Function(...) as its method also.
This is not entirely true. You confuse a visibility of a method
with its access rights. Class B can see `A::SomeFunction' method
all right. What it cannot do is to access `A::SomeFunction' in
order to perfom a call (or to take an address of the method).
During call resolution function properties are tested in the
following order:
1. Name matching.
2. Argument overloading matching.
3. Access rights.
Every name in the base class (including private ones) is visible
in derived class.
Alex
.
- Follow-Ups:
- Re: subclassing question
- From: robbio
- Re: subclassing question
- References:
- subclassing question
- From: PaulH
- Re: subclassing question
- From: robbio
- subclassing question
- Prev by Date: Re: subclassing question
- Next by Date: Re: Native Assembly Cache (WinSxS folder) & assemblies version policies
- Previous by thread: Re: subclassing question
- Next by thread: Re: subclassing question
- Index(es):
Relevant Pages
|