Boost logo

Boost Users :

Subject: [Boost-users] gcc3.4 and boost type trait (is_virtual_base_of) , compile warning
From: emeplease (emeplease_at_[hidden])
Date: 2011-04-01 04:28:03


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net