Calling
std::count_if(vec.begin(), vec.end(), std::bind2nd(std::ptr_fun(foo), 17))
works fine with
bool foo(int, int),
but I can't make it work with
bool foo(const int &, const int &)
Is there a way to make that work or do I have to write my own adaptor function?