Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-02-15 16:20:44


Meryl Silverburgh wrote:
> Thanks. But I have the following compiler error. Thanks for any idea
> to fix it.
>
> code:
> #include "boost/lambda/bind.hpp"
> #include "boost/lambda/lambda.hpp"
>
> using namespace std;
>
> using namespace boost::lambda;
>
> transform(inputs.begin(), inputs.end(), bdl.begin(), _1 =
> bind(new_ptr<Rect>()));

transform( inputs.begin(), inputs.end(), bdl.begin(), new_ptr<Rect>() );

should be enough.

> ../TestBlockData.cpp: In member function 'void
> TestBlockData::buildBlockDataList(std::vector<std::string,
> std::allocator<std::string> >&, BlockDataList&)':
> ../TestBlockData.cpp:119: error: '_1' was not declared in this scope

That's odd.

> ../TestBlockData.cpp:119: error: 'new_ptr' was not declared in this
> scope

Looks like the compiler can't find new_ptr. You probably need to #include
"boost/lambda/construct.hpp".


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