Re: [gtkmm] Bug 116280



On Tuesday 08 July 2003 9:07 am, Murray Cumming Comneon com wrote:
> > From: Frank Naumann [mailto:fnaumann cs uni-magdeburg de]
> > Just a question about this bug. Will it be fixed in 2.4?
>
> Probably. I had the same problem with Bakery. But I need to investigate
> this properly because I'm not convinced that it's not a compiler bug. I
> believe that the virtualness of base classes should be inherited, so no
> change should be necessary. But I know I could be wrong - very few people
> properly understand virtual inheritance.

If I have understood your point, then I do not think that is correct.  Where 
you have multiple inheritance, you have to explicitly declare virtualness on 
each occasion the inheritance is virtual.  Otherwise you could not achieve 
this heirarchy:

     A
     |
   _____
  |     |
  B     B
  |     |
  C     C
  |     |
   _____
     |
     D

(That is, a case where D has two Bs and two Cs but only one A).  I think the 
problem in the case to which the bug report relates is that in D you only 
want one B as well as one A.  If that is the case, the virtual inheritance of 
B by C must be explicitly declared (as well as the virtual inheritance of A 
by B).

Chris.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]