There was this effort to standardise concepts that I believe started from the Boost.ConceptCheck library, but it has been delayed to some future edition of the standard.

Anyway, the normal course of things is to do something like your second code snippet, then just use the predicate and let an error happen if it does not follow the prescribed interface. This way it does not have to matter if the user passes a function pointer or a function object as the predicate.

Alternatively, you could define an abstract base class to serve as the predicate interface, but that may just be an unnecessary limitation (and possible virtual function call overhead).