Boost logo

Boost Users :

Subject: [Boost-users] [variant][graph] Conflict ?
From: Maxime van Noppen (maxime_at_[hidden])
Date: 2010-01-14 09:13:14


Hi,

I recently upgraded the boost version used four our project from boost
1.39 to boost 1.41 and encountered a very strange compilation error. I
managed to reduce the problem to this minimal test case :

----------var.cc---------------
#include <boost/variant.hpp>
#include <boost/graph/breadth_first_search.hpp>

int main()
{
  boost::variant<char, bool> v;

  boost::get<int>(v);
}
----------------------------

This doesn't compile on Linux 64bits with gcc 4.4.2 20091208 and
produces this error message :

----------------------------
> In file included from /usr/include/boost/graph/graph_concepts.hpp:17,
> from /usr/include/boost/graph/breadth_first_search.hpp:21,
> from var.cc:2:
> /usr/include/boost/property_map/property_map.hpp: In instantiation of ‘boost::property_traits<int>’:
> /usr/include/boost/graph/two_bit_color_map.hpp:46: instantiated from ‘boost::two_bit_color_map<int>’
> var.cc:8: instantiated from here
> /usr/include/boost/property_map/property_map.hpp:31: error: ‘int’ is not a class, struct, or union type
> /usr/include/boost/property_map/property_map.hpp:32: error: ‘int’ is not a class, struct, or union type
> /usr/include/boost/property_map/property_map.hpp:33: error: ‘int’ is not a class, struct, or union type
> /usr/include/boost/property_map/property_map.hpp:34: error: ‘int’ is not a class, struct, or union type
----------------------------

Could there be a conflict between boost.variant and boost.graph or did I
miss something ?

Thanks,

-- 
Maxime

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