Boost logo

Boost Users :

From: Daniel Wallin (dalwan01_at_[hidden])
Date: 2006-01-11 13:39:42


David Greene wrote:
> Hi again,
>
> As can can probably guess, I'm just learning how to use the BLL.
>
> Here's another testcase I'm having trouble with:

You are just using the wrong algorithm. It should be find_if(), not find():

[...]
> std::vector<Test>::iterator find_value(const Test &value)
> {
> using boost::lambda::bind;
> using boost::lambda::_1;
>
> return(std::find(seq.begin(), seq.end(),
                 ^^^^
> bind(&Test::get, _1) == value.get()));
> }
[...]

-- 
Daniel Wallin

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