
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".