<<< std::sort example | Index | std::count_if and predicate function >>> |
A function returning a bool is a predicate.
An object which overloads operator( ) to return bool is also a predicate.
Some algorithms take predicates and do useful things with them.
<<< std::sort example | Index | std::count_if and predicate function >>> |