Re: Multiple Inheritance ambiguity but not really?
On Apr 11, 4:13 pm, Nick Overdijk <n...@dotsimplicity.net> wrote:
James Kanze wrote:
Hm, yeah. I understand. Is there a way (besides virtual
inheritance) to have a class that resembles this:
[base][a][b][c] ?
I'm not sure I understand the question. What it seems to
boil down to is: is there any way, except the existing
way(s), to have a class [...]. This is what virtual
inheritance was designed for.
Not the existing ways, the ways that I know of. Other ways
besides the ways that I know of to do that. If virtual
inheritance is the only way then fine, I was just wondering.
Well, virtual inheritance is *the* way. It's doubtlessly
possible to simulate it using other techniques, but my point was
just: why? You know the "standard" solution, but it sounded
like you weren't too happy with it.
Thanks for everyone's help, think I understand it now. Are
there any pitfalls when using a lot of virtual inheritance?
There are pitfalls when any technique is used where it shouldn't
be. My own impression is that there are no more with virtual
inheritance than with normal inheritance, and that inheritance
really should have been virtual by default.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34