|
Boost Users : |
From: Sebastian Weber (sebastian.weber_at_[hidden])
Date: 2006-04-20 02:41:49
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<boost::vecS,
boost::vecS,
boost::undirectedS, boost::no_property, boost::no_property,
boost::no_property, boost::listS>&)'
"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"
Any help would be greatly appreciated. Thanks a lot!
Almost forgot: My Boost version is 1.33.1 and the compiler I use is g++
3.3.5 from Debian sarge.
Greetings,
Sebastian
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