[Serialization] virtual function and virtual inheritance

Hi, I have a compilation error with a virtual function inside a virtual base class. For example, I just add a function f() inside the unit test : "test_diamond.cpp". class base { ... virtual void f() =0; ... }; class derived1 { ... virtual void f(){} ... }; gcc 4.3, returns me an error: error: no unique final overrider for `virtual void base::f()' in `boost::detail::is_virtual_base_of_impl<derived1, final, mpl_::bool_< true> >::X' The same code works properly with msvc 2005. Best regards, Fabien Castan

I have a compilation error with a virtual function inside a virtual base class. For example, I just add a function f() inside the unit test : "test_diamond.cpp".
class base { ... virtual void f() =0; ... };
class derived1 { ... virtual void f(){} ... };
gcc 4.3, returns me an error: error: no unique final overrider for `virtual void base::f()' in `boost::detail::is_virtual_base_of_impl<derived1, final, mpl_::bool_< true> >::X'
Sigh... I suspect this is the same issue as: https://svn.boost.org/trac/boost/ticket/3730 which we don't know how to solve (indeed it might well be unsolvable). One option might be to specialize the traits class for the problem classes: namespace boost{ template<> struct is_virtual_base_of<myderived, mybase>: public mpl::true_ {}; } HTH, John.
participants (2)
-
fab
-
John Maddock