Boost logo

Boost Users :

Subject: Re: [Boost-users] [graph][spirit] Boost.Graph and Boost.Spirit incompatible ?
From: Maxime van Noppen (maxime_at_[hidden])
Date: 2010-03-04 14:00:26


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

BTW, I noticed that if I change the order of the includes everything
compiles fine. There's something really weird going on.

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