Hi,
i'm new to boost and encountered the following problem with the boost graph
library and this code:
#include "boost/graph/adjacency_list.hpp"
#include "boost/graph/adjacency_matrix.hpp"
#include "boost/graph/filtered_graph.hpp"
int main (void)
{
using namespace boost;
typedef adjacency_matrix<undirectedS> Graph;
//typedef adjacency_list Graph;
typedef filtered_graph FilteredGraph;
Graph g (5);
FilteredGraph fg (g, keep_all ());
}
This results in a lot of error messages from the compiler (see end of email),
all located in the bgl files. If i use adjacency_list (as in the commented
line above) instead of adjacency_matrix, everything's fine. I use gcc 3.3
under linux and version 1.30 of the boost library.
Is this a bug? Is there an easy way to make filtered_graph work with
adjacency_matrix? (I'd like to use adjacency_matrix because my graphs are
almost complete graphs).
Best regards,
Matthias Rupp
The first error messages from the compiler (the rest are also complaints about
forming references to void):
../boost_1_30_0/boost/iterator_adaptors.hpp: In instantiation of
`boost::iterator_adaptor >, void>,
boost::detail::matrix_edge_desc_impl,
boost::detail::matrix_edge_desc_impl,
boost::detail::matrix_edge_desc_impl*,
boost::multi_pass_input_iterator_tag, ptrdiff_t>':
../boost_1_30_0/boost/graph/filtered_graph.hpp:216: instantiated from
`boost::filtered_graph'
complaint.cpp:23: instantiated from here
../boost_1_30_0/boost/iterator_adaptors.hpp:852: error: forming reference to
void
../boost_1_30_0/boost/iterator_adaptors.hpp:927: error: forming reference to
void
../boost_1_30_0/boost/iterator_adaptors.hpp: In instantiation of
`boost::filter_iterator_policies >, void>':
../boost_1_30_0/boost/type_traits/is_convertible.hpp:128: instantiated from
`boost::detail::is_convertible_basic_impl >, void>&, boost::detail::int_convertible>'
../boost_1_30_0/boost/type_traits/is_convertible.hpp:191: instantiated from
`boost::detail::is_convertible_impl >, void>&, boost::detail::int_convertible>'
../boost_1_30_0/boost/type_traits/is_enum.hpp:91: instantiated from
`boost::is_convertible >, void>&, boost::detail::int_convertible>'
../boost_1_30_0/boost/type_traits/is_enum.hpp:91: instantiated from
`boost::detail::is_enum_helper<false>::type >, void>&>'
../boost_1_30_0/boost/type_traits/is_enum.hpp:91: instantiated from
`boost::detail::is_enum_impl >, void> >'
../boost_1_30_0/boost/type_traits/is_scalar.hpp:36: instantiated from
`boost::is_enum >, void> >'
../boost_1_30_0/boost/type_traits/is_scalar.hpp:36: instantiated from
`boost::detail::is_scalar_impl >, void> >'
../boost_1_30_0/boost/type_traits/is_class.hpp:76: instantiated from
`boost::is_scalar >, void> >'
../boost_1_30_0/boost/type_traits/is_class.hpp:76: instantiated from
`boost::detail::is_class_impl >, void> >'
../boost_1_30_0/boost/type_traits/is_empty.hpp:75: instantiated from
`boost::is_class >, void> >'
../boost_1_30_0/boost/type_traits/is_empty.hpp:75: instantiated from
`boost::detail::is_empty_impl >, void> >'
../boost_1_30_0/boost/iterator_adaptors.hpp:934: instantiated from
`boost::is_empty >, void> >'
../boost_1_30_0/boost/iterator_adaptors.hpp:934: instantiated from
`boost::compressed_pair >, void> >'
../boost_1_30_0/boost/iterator_adaptors.hpp:934: instantiated from
`boost::iterator_adaptor >, void>,
boost::detail::matrix_edge_desc_impl,
boost::detail::matrix_edge_desc_impl,
boost::detail::matrix_edge_desc_impl*,
boost::multi_pass_input_iterator_tag, ptrdiff_t>'
../boost_1_30_0/boost/graph/filtered_graph.hpp:216: instantiated from
`boost::filtered_graph'
complaint.cpp:23: instantiated from here
../boost_1_30_0/boost/iterator_adaptors.hpp:1313: error: forming reference to
void
../boost_1_30_0/boost/iterator_adaptors.hpp:1315: error: forming reference to
void
../boost_1_30_0/boost/iterator_adaptors.hpp:1344: error: forming reference to
void
[...]