Boost logo

Boost Users :

From: Sashan Govender (sashang_at_[hidden])
Date: 2007-06-01 03:04:02


Hi

I'm trying to run a functor over edges from a graph using for_each
however it fails when the iterators are edges. The same technique
works for iterators to vertices. Here is the compiler error:

g++ -o bind_edge_test bind_edge_test.cpp
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h:
In function '_Function std::for_each(_InputIterator, _InputIterator,
_Function) [with _InputIterator =
boost::detail::undirected_edge_iter<std::_List_iterator<boost::list_edge<void*,
boost::property<boost::edge_name_t, unsigned int, boost::no_property>
> >, boost::detail::edge_desc_impl<boost::undirected_tag, void*>,
int>, _Function = boost::_bi::bind_t<void, Op,
boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >]':
bind_edge_test.cpp:79: instantiated from here
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4/bits/stl_algo.h:159:
error: no match for call to '(boost::_bi::bind_t<void, Op,
boost::_bi::list2<boost::arg<1>, boost::_bi::value<int> > >)
(boost::detail::edge_desc_impl<boost::undirected_tag, void*>)'

I've attached the file. Thanks for the help.

-- 
sashan
http://sashang.orcon.net.nz/



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