Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
A predicate is a logical expression that evaluates to true or false, like in if-statements.
In the example below, it is shown how to replace negative values by zero. The predicate is if an integer is less then zero.
#include <algorithm> |
An overview of STL predicates names and their corresponding operator, from [0]. These predicates can be found in the header file functional.
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.