I am using std::ptr_fun as follows:
std::ptr_fun
static inline std::string <rim(std::string &s) { s.erase(s.begin(), std::find_if(s.begin(), s.end(
You use Lambda as suggested by Nicol Bolas but you can use auto and type will be deduced there, as follow:-
static inline std::string <rim(std::string &s) { s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](auto c) {return !std::isspace(c);})); return s; }