gcc3.4 and boost type trait (is_virtual_base_of) , compile warning
Hello , I am using boost 1.41 with gcc 3.4 (I know it's pretty old) , I am having problem with "is_virtual_base_of" The following lines of code will reproduce the problem. Thank you very much Joseph ======== test_typetrait.cpp ============== #include <iostream> #include <boost/type_traits/is_virtual_base_of.hpp> class Fruit { }; class Apple : virtual public Fruit { }; int main(int argc,char** argv) { std::cout << std::endl << boost::is_virtual_base_of< Fruit, Apple>::value << std::endl; return 0; } ======== full Compile warning ============== include/boost/type_traits/is_virtual_base_of.hpp: In instantiation of `boost::detail::is_virtual_base_of_impl<Fruit, Apple, mpl_::bool_< true> >::X': include/boost/type_traits/is_virtual_base_of.hpp:70: instantiated from `boost::detail::is_virtual_base_of_impl<Fruit, Apple, mpl_::bool_< true> >' include/boost/type_traits/is_virtual_base_of.hpp:78: instantiated from `boost::detail::is_virtual_base_of_impl2<Fruit, Apple>' include/boost/type_traits/is_virtual_base_of.hpp:87: instantiated from `boost::is_virtual_base_of<Fruit, Apple>' test_typetrait.cpp:119: instantiated from here include/boost/type_traits/is_virtual_base_of.hpp:56: warning: direct base `Fruit' inaccessible in `boost::detail::is_virtual_base_of_impl<Fruit, Apple, mpl_::bool_< true>
::X' due to ambiguity
Hello , I am using boost 1.41 with gcc 3.4 (I know it's pretty old) , I am having problem with "is_virtual_base_of"
The following lines of code will reproduce the problem. Thank you very much
It's a known issue, specific to GCC-3.4.x, and I don't have a fix, sorry :-( Regards, John.
participants (2)
-
emeplease
-
John Maddock