Re: [gtkmm] Reducing duplication in bakery_gnomeui



On Wed, 2004-03-31 at 13:56, Bryan Forbes wrote:
> Murray and I were working on Bakery and Bakery_gnomeui the other day,
> when we ran into a snag: App_Gtk and App_GnomeUI both use the same code
> for their menus, but when you virtually derive App_GnomeUI from App_Gtk,
> we get a bunch of compile errors.  Here they are:
> 
> In file included from App_GnomeUI.cc:19:
> ../../bakery_gnomeui/App/App_GnomeUI.h:47: no unique final overrider for

I believe if you've got the diamond inheritance, and both the left/right
sides define the same function, you've got to define the function in the
bottom class and "pick" one to forward to (ie. either
<right>::destroy_notify_() or  <left>::destroy_notify_();

The compiler can't pick which function to resolve to, when it has two
choices.

BTW, I don't believe this has anything to do with virtual inheritance,
it's more a result of the MI diamond shape.

Regards,
Carl




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