|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-02-15 16:14:37
yinglcs2_at_[hidden] wrote:
> int count = count_if (bdl.begin(), bdl.end(),
> bind( &BlockData::isContainer, _1) );
This looks like it should work, assuming
bool BlockData::isContainer() const;
> But this code does not copmile,I get this error:
> g++ -O0 -g3 -Wall -c -fmessage-length=0
> -oBlockDataUtils.o ../BlockDataUtils.cpp
> ../BlockDataUtils.cpp: In function â?~bool
> hasContainerBlock(BlockDataList&)â?T:
> ../BlockDataUtils.cpp:95: error: no matching function
> for call to â?~bind(<unknown type>, const
> boost::lambda::lambda_functor<boost::lambda::placeholder<1>
>> &)â?T
Since you are using the _1 placeholder from the Lambda library, you need to
use boost::lambda::bind as well. Currently boost::bind and Lambda do not
recognize each other's placeholders (and don't interoperate in general).
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