Problem with virtual inheritance
Jakob ÃÂstergaard
jakob@ostenfeld.dk
Tue Nov 30 23:39:00 GMT 1999
On Mon, Nov 01, 1999 at 06:09:19PM +0100, Martin v. Loewis wrote:
>
> > I cannot read from the standard (The C++ programming language by Bjarne
> > Stroustrup, third edition) whether it's my code that's wrong, or the
> > compiler.
>
> [I don't have the book here, right now, but I can't imagine that this
> is not explained].
>
> Please re-read the section on virtual inheritance, and look for
> explanations of constructor calls. Constructors of virtual bases are
> called directly from the most derived class; ctor-initialisers in base
> classes are not executed.
Ok, that explains it ! It even answers another question I had (but didn't
ask).
My apologies for bothering this list with my misunderstandings of the language.
...
> If you can't find it in the book, please discuss this on
> comp.lang.c++.moderated. If you then still think there is a book in
> the compiler, feel free to resubmit your report.
Just re-reading section 15.2.4.1 for the fifth time, I saw that it has
an explanation of exactly this issue, along with a nice example.
I should buy some glasses I guess.
Anyway, thanks for the quick reply,
--
................................................................
: jakob@ostenfeld.dtu.dk : And I see the elder races, :
:.........................: putrid forms of man :
: Jakob ÃÂstergaard : See him rise and claim the earth, :
: OZ9ABN : his downfall is at hand. :
:.........................:............{Konkhra}...............:
More information about the Gcc-bugs
mailing list