Just use std::bind
, there's no need for std::mem_fun
(as explained in the comments).
std::for_each(
std::begin(results),
std::end(results),
std::bind(CalculateThres, std::placeholders::_1, 1));
Also, bind1st
and bind2nd
are deprecated, you should use bind
instead. Similarly, mem_fun
is deprecated too, its replacement is mem_fn
.