
Hello everybody!
I'm starting to use the boost lambda library. My first steps with it
were quite amazing, but now I'm comming to some more advanced problems
and I don't see my fault. The code in question is
std::for_each(vertices(bg).first,
vertices(bg).second,
bind(ll::fill_n(), // line 197, supposenly wrong
std::back_inserter(vs),
bind(out_degree, _1, bg),
_1));
which does not compile with the error message:
box_cover.hpp: In function `size_t boost::box_cover(Graph&,
RandomGenerator&,
BoxMap, unsigned int, unsigned int)':
box_cover.hpp:197: error: parse error before `::' token
"g++-3.3" -Wall -ftemplate-depth-100 -msse2 -mfpmath=sse,387 -O3
-finline-functions -Wno-inline-fPIC -msse2 -mfpmath=sse,387
-DBOOST_DATE_TIME_DYN_LINK=1 -DDATE_TIME_INLINE -DNDEBUG -I"."
-I"/home/sebi/projects/diplom/src/boost_1_33_1" -c -o
"../../bin/graph/gcc-3.3/release/boxTest.o" "boxTest.cpp"
I thought, I could realize this stuff with the boost::bind library as
well and tried the construct
std::for_each(vertices(bg).first,
vertices(bg).second,
boost::bind(std::fill_n,
std::back_inserter(vs),
boost::bind(boost::out_degree, _1, bg), _1) );
which does not compile as well:
box_cover.hpp: In function `size_t boost::box_cover(Graph&,
RandomGenerator&,
BoxMap, unsigned int, unsigned int) [with Graph = main(int,
char**)::graph_t, RandomGenerator = base_rand_gen_t, BoxMap =
size_t*]':
boxTest.cpp:140: instantiated from here
box_cover.hpp:202: error: no matching function for call to
`bind(<unknown
type>, boost::arg<1>&, boost::adjacency_list
participants (1)
-
Sebastian Weber