Ok, another alarming error message for me, if I understand that std :: bind is correct, can I use arguments like _1 to determine an unspecified argument? Right? Having well considered the following line:
std::function<bool(value_type, const std::string &)> func(std::bind(&Pred, _1, "name"));
That should work, right? This will be used for the std :: find_if () function, since the first argument must be the type of the value, and the second should be the string.
However, visual studio 2010 complains about this with the following error message:
error C2065: '_1': undeclared identifier
It's just weird, as I can say in the visual studio, "Hey, the first argument is unconnected." Pred is a simple function that takes value_type, const std::string& as arguments - returns a boolean value.
source share