Hello, Benjamin.
Thursday, November 13, 2008 at 1:19:30 PM you wrote:
The bug you're seeing is in Dinkumware's bind, not boost's.
Try using boost::bind explicitly and I suspect it will work fine.
BS> Thanks for the quick answer. I replaced it with
BS> #include
BS> std::find_if(v.begin(), v.end(), boost::bind( &Foo::first_, _1 ) == test
BS> );
I think what the better way is to use boost::lambda::bind
instead of boost::bind for such purposes. If you'll use boost::lambda
you will have guarantee what you code remains unambiguous. Try:
#include
#include
namespace bl = boost::lambda;
std::find_if(v.begin(), v.end(), bl::bind( &Foo::first_, bl::_1 ) ==
test);
--
Best Regards,
Sergey mailto:flex_ferrum@artberg.ru