boost::trim
文字列のベクトルで使用しようとしています。このソリューションがエレガントに機能することは理解していますが、理由がわかりません
std::for_each(df.colnames.begin(), df.colnames.end(),
std::bind2nd(std::ptr_fun(boost::trim<std::string>), std::locale()));
動作しません。エラーが発生します:
error: ‘typename _Operation::result_type std::binder2nd<_Operation>::operator()(typename _Operation::first_argument_type&) const [with _Operation = std::pointer_to_binary_function<std::basic_string<char>&, const std::locale&, void>; typename _Operation::result_type = void; typename _Operation::first_argument_type = std::basic_string<char>&]’ cannot be overloaded
なぜstd::bind2nd
ここで動作しないのですか?