Hello, I am a new beginner with boost. And here is my test code,
using namespace boost::lambda;
std::vector<std::string> strings;
strings.push_back("Boost");
strings.push_back("C++");
strings.push_back("Libraries");
std::vector<int> sizes;
std::for_each(
strings.begin(),
strings.end(),
bind(
&std::vector<int>::push_back,
sizes,
bind<std::size_t>(&std::string::size, _1)));
std::for_each(sizes.begin(), sizes.end(), var(std::cout)<<_1);
build the project and yield an error:
error C2665: 'boost::lambda::function_adaptor::apply' : none of the 2 overloads could convert all the argument types
I wonder what's wrong? Really appreciate.