Boost logo

Boost Users :

From: Matthias Rupp (rupp_at_[hidden])
Date: 2003-06-30 15:27:27


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<vecS, vecS, undirectedS> Graph;
    typedef filtered_graph<Graph, keep_all> 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::filter_iterator_policies<boost::detail::in_edge_predicate<boost::keep_all,
boost::keep_all, boost::filtered_graph<main()::Graph, boost::keep_all,
boost::keep_all> >, void>,
boost::detail::matrix_edge_desc_impl<boost::undirected_tag, size_t>,
boost::detail::matrix_edge_desc_impl<boost::undirected_tag, size_t>,
boost::detail::matrix_edge_desc_impl<boost::undirected_tag, size_t>*,
boost::multi_pass_input_iterator_tag, ptrdiff_t>':
../boost_1_30_0/boost/graph/filtered_graph.hpp:216: instantiated from
`boost::filtered_graph<main()::Graph, boost::keep_all, boost::keep_all>'
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<boost::detail::in_edge_predicate<boost::keep_all,
boost::keep_all, boost::filtered_graph<main()::Graph, boost::keep_all,
boost::keep_all> >, void>':
../boost_1_30_0/boost/type_traits/is_convertible.hpp:128: instantiated from
`boost::detail::is_convertible_basic_impl<boost::filter_iterator_policies<boost::detail::in_edge_predicate<boost::keep_all,
boost::keep_all, boost::filtered_graph<main()::Graph, boost::keep_all,
boost::keep_all> >, void>&, boost::detail::int_convertible>'
../boost_1_30_0/boost/type_traits/is_convertible.hpp:191: instantiated from
`boost::detail::is_convertible_impl<boost::filter_iterator_policies<boost::detail::in_edge_predicate<boost::keep_all,
boost::keep_all, boost::filtered_graph<main()::Graph, boost::keep_all,
boost::keep_all> >, void>&, boost::detail::int_convertible>'
../boost_1_30_0/boost/type_traits/is_enum.hpp:91: instantiated from
`boost::is_convertible<boost::filter_iterator_policies<boost::detail::in_edge_predicate<boost::keep_all,
boost::keep_all, boost::filtered_graph<main()::Graph, boost::keep_all,
boost::keep_all> >, 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<boost::filter_iterator_policies<boost::detail::in_edge_predicate<boost::keep_all,
boost::keep_all, boost::filtered_graph<main()::Graph, boost::keep_all,
boost::keep_all> >, void>&>'
../boost_1_30_0/boost/type_traits/is_enum.hpp:91: instantiated from
`boost::detail::is_enum_impl<boost::filter_iterator_policies<boost::detail::in_edge_predicate<boost::keep_all,
boost::keep_all, boost::filtered_graph<main()::Graph, boost::keep_all,
boost::keep_all> >, void> >'
../boost_1_30_0/boost/type_traits/is_scalar.hpp:36: instantiated from
`boost::is_enum<boost::filter_iterator_policies<boost::detail::in_edge_predicate<boost::keep_all,
boost::keep_all, boost::filtered_graph<main()::Graph, boost::keep_all,
boost::keep_all> >, void> >'
../boost_1_30_0/boost/type_traits/is_scalar.hpp:36: instantiated from
`boost::detail::is_scalar_impl<boost::filter_iterator_policies<boost::detail::in_edge_predicate<boost::keep_all,
boost::keep_all, boost::filtered_graph<main()::Graph, boost::keep_all,
boost::keep_all> >, void> >'
../boost_1_30_0/boost/type_traits/is_class.hpp:76: instantiated from
`boost::is_scalar<boost::filter_iterator_policies<boost::detail::in_edge_predicate<boost::keep_all,
boost::keep_all, boost::filtered_graph<main()::Graph, boost::keep_all,
boost::keep_all> >, void> >'
../boost_1_30_0/boost/type_traits/is_class.hpp:76: instantiated from
`boost::detail::is_class_impl<boost::filter_iterator_policies<boost::detail::in_edge_predicate<boost::keep_all,
boost::keep_all, boost::filtered_graph<main()::Graph, boost::keep_all,
boost::keep_all> >, void> >'
../boost_1_30_0/boost/type_traits/is_empty.hpp:75: instantiated from
`boost::is_class<boost::filter_iterator_policies<boost::detail::in_edge_predicate<boost::keep_all,
boost::keep_all, boost::filtered_graph<main()::Graph, boost::keep_all,
boost::keep_all> >, void> >'
../boost_1_30_0/boost/type_traits/is_empty.hpp:75: instantiated from
`boost::detail::is_empty_impl<boost::filter_iterator_policies<boost::detail::in_edge_predicate<boost::keep_all,
boost::keep_all, boost::filtered_graph<main()::Graph, boost::keep_all,
boost::keep_all> >, void> >'
../boost_1_30_0/boost/iterator_adaptors.hpp:934: instantiated from
`boost::is_empty<boost::filter_iterator_policies<boost::detail::in_edge_predicate<boost::keep_all,
boost::keep_all, boost::filtered_graph<main()::Graph, boost::keep_all,
boost::keep_all> >, void> >'
../boost_1_30_0/boost/iterator_adaptors.hpp:934: instantiated from
`boost::compressed_pair<void,
boost::filter_iterator_policies<boost::detail::in_edge_predicate<boost::keep_all,
boost::keep_all, boost::filtered_graph<main()::Graph, boost::keep_all,
boost::keep_all> >, void> >'
../boost_1_30_0/boost/iterator_adaptors.hpp:934: instantiated from
`boost::iterator_adaptor<void,
boost::filter_iterator_policies<boost::detail::in_edge_predicate<boost::keep_all,
boost::keep_all, boost::filtered_graph<main()::Graph, boost::keep_all,
boost::keep_all> >, void>,
boost::detail::matrix_edge_desc_impl<boost::undirected_tag, size_t>,
boost::detail::matrix_edge_desc_impl<boost::undirected_tag, size_t>,
boost::detail::matrix_edge_desc_impl<boost::undirected_tag, size_t>*,
boost::multi_pass_input_iterator_tag, ptrdiff_t>'
../boost_1_30_0/boost/graph/filtered_graph.hpp:216: instantiated from
`boost::filtered_graph<main()::Graph, boost::keep_all, boost::keep_all>'
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
[...]


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