Couldn\'t find_if
just be an overload of find
? That\'s how std::binary_search
and friends do it...
Here's what Stroustrup said (The C++ Programming Language, 18.5.2):
If
find()
andfind_if()
had the same name, surprising abmiguities would have resulted. In general, the_if
suffix is used to indicate that an algrithm takes a predicate.
As to what exactly that "ambiguity" is, Steve Jessop answered that in his (top rated) answer to this SO question.
(note: that question may actually qualify as the same question as this one. I'm not quite smart enough in C++ arcania to decide).