Boost logo

Boost Users :

Subject: [Boost-users] [graph][spirit] Boost.Graph and Boost.Spirit incompatible ?
From: Maxime van Noppen (maxime_at_[hidden])
Date: 2010-03-04 13:45:43


Hi,

After my very big disappointment when I discovered that Boost.Graph and
Boost.Variant where incompatible[1], now it seems that Boost.Graph and
Boost.Spirit (and more precisely Qi) are incompatible... :(

Minimal test case :

-------- test.cc -----------
#include <boost/graph/dijkstra_shortest_paths.hpp>
#include <boost/spirit/include/qi.hpp>
----------------------------

> $ g++ -c test.cc
> In file included from /usr/include/boost/graph/properties.hpp:19,
> from /usr/include/boost/graph/named_function_params.hpp:13,
> from /usr/include/boost/graph/dijkstra_shortest_paths.hpp:20,
> from inc_test.cc:1:
> /usr/include/boost/property_map/property_map.hpp: In instantiation of ‘boost::property_traits<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >’:
> /usr/include/boost/graph/two_bit_color_map.hpp:47: instantiated from ‘boost::two_bit_color_map<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >’
> /usr/include/boost/spirit/home/qi/char/char.hpp:206: instantiated from here
> /usr/include/boost/property_map/property_map.hpp:31: error: no type named ‘key_type’ in ‘struct std::basic_string<char, std::char_traits<char>, std::allocator<char> >’
> /usr/include/boost/property_map/property_map.hpp:34: error: no type named ‘category’ in ‘struct std::basic_string<char, std::char_traits<char>, std::allocator<char> >’
> /usr/include/boost/property_map/property_map.hpp: In instantiation of ‘boost::property_traits<std::list<boost::spirit::info, std::allocator<boost::spirit::info> > >’:
> /usr/include/boost/graph/two_bit_color_map.hpp:47: instantiated from ‘boost::two_bit_color_map<std::list<boost::spirit::info, std::allocator<boost::spirit::info> > >’
> /usr/include/boost/spirit/home/support/detail/what_function.hpp:35: instantiated from here
> /usr/include/boost/property_map/property_map.hpp:31: error: no type named ‘key_type’ in ‘class std::list<boost::spirit::info, std::allocator<boost::spirit::info> >’
> /usr/include/boost/property_map/property_map.hpp:34: error: no type named ‘category’ in ‘class std::list<boost::spirit::info, std::allocator<boost::spirit::info> >’

I have g++ 4.4.3 on Linux amd64 and Boost 1.42.0.

Maybe there should be some documentation about such incompatibilities
between boost libraries.

[1] http://lists.boost.org/boost-users/2010/01/55317.php

-- 
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