Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-09-26 17:10:32


Mark Loew wrote:
> Okay,
>
> Call me stupid but I can't get this to work
>
> class Base
> {
> virtual const bool CheckFunc(const value& val ) const { return
> true; }
> }

[...]

> std::find_if( vecBase.begin(), vecBase.end(),
> boost::bind(Base::CheckFunc, aVal ) );

Try

    boost::bind(&Base::CheckFunc, _1, aVal)

instead. Remember that a member function has an implicit 'this' argument.


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