private inheritance

T

Tony Johansson

Hello!

Private inheritance is sometimes called implementation inheritance.
If you use this private inheritance how is with the usage of overriding
then.
Is overriding used less often when having private inheritance then when you
have public inheritance.

I just want to have you opinion about this matter.

//Tony
 
M

Marc Mutz

Tony Johansson wrote:
Private inheritance is sometimes called implementation
inheritance. If you use this private inheritance how is
with the usage of overriding then.
Is overriding used less often when having private
inheritance then when you have public inheritance.
<snip>

You could say that private inheritance almost always
involves overriding private base class' methods, b/c
that's one of the two scenarios where you can't use
composition instead (the other one being access to
protected members).

As to the comparison with the amount of overriding going
on in public inheritance: I have no clue. Take a large
real-world project and measure, I guess.

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,787
Messages
2,569,630
Members
45,335
Latest member
Tommiesal

Latest Threads

Top