Boost logo

Boost Users :

Subject: Re: [Boost-users] [graph][spirit] Boost.Graph and Boost.Spirit incompatible ?
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2010-03-04 14:06:27


On Thu, 4 Mar 2010, Maxime van Noppen wrote:

> On 03/04/2010 07:56 PM, Jeremiah Willcock wrote:
>> How are you ending up with std::string (or an std::list in the second
>> error message) as an index map? What are you trying to call Dijkstra's
>> algorithm on?
>
> The minimal test case is actually only the two includes and nothing
> else. No code, nothing. Just includes.
>
> -----------------
> $ cat inc_test.cc
> #include <boost/graph/dijkstra_shortest_paths.hpp>
> #include <boost/spirit/include/qi.hpp>
> $ /usr/bin/g++ -c inc_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> >’

This is the same issue as variant actually -- the boost::get thing. The
info object that is causing trouble in char.hpp contains a variant that
it's trying to get a field from. It's too bad that a later library
(variant) reused a name from an earlier one (graph), but it's probably too
late to do anything about either one.

-- Jeremiah Willcock


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