Hi all
Rather than writing std::binary:functions I thought it would be nice to
create a comparison expression directly into the algorithm expression.
Typical use is
struct Person
{
std::string name () const;
};
// Find "John"
std::vector<Person>::iterator it = std::find_if (persons.begin(),
persons.end(), somehow bind Person::name method == "John");
While std::equal could be used in some simple cases, it does not accept
mixed input like &Person::name and "John" (at least to my knowledge)
Is there a way to accomplish this type of comparison using a mix of
binding of functions /return values and plain values ?
Thanks,
Anders