|
Boost Users : |
From: Jean-Pierre Bergamin (james_at_[hidden])
Date: 2008-04-13 06:45:26
Jean-Pierre Bergamin schrieb:
> Hello again
>
> Steven Watanabe wrote:
>
>> Try using boost::function<bool(int)> for the predicate type.
>>
>>
> Thank you Steven. Using boost::function as the predicate type does the
> trick. For the sake of completeness, I post some code at the bottom.
> I think this is a very useful method to provide filtered values to a
> user, without copying any elements.
>
>
Copying is of course only avoided if the Predicate function is defined
as boost::function<bool(const T&)> PredFunction.
James
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