Код: Выделить всё
static inline std::string <rim(std::string &s) {
s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun(std::isspace))));
return s;
}
Однако это не компилируется с C++17 (с использованием Microsoft Visual Studio 2017) с ошибкой:
Код: Выделить всё
error C2039: 'ptr_fun': is not a member of 'std'
Подробнее здесь: https://stackoverflow.com/questions/449 ... nt-for-c17