In the C++ Standard Library, the algorithms library provides various functions that perform algorithmic operations on containers and other sequences, represented by Iterators.
C++17 provides the ability for many algorithms to optionally take an execution policy, which may allow implementations to execute the algorithm in parallel (i.e. by using threads or SIMD instructions).
There are four different policy types, each indicating different semantics about the order in which element accesses are allowed to be observed relative to each other It is up to the user to ensure that the operations performed by the function are thread safe when using policies which may execute across different threads.
They extend the functionality of the basic algorithms by allowing iterator-sentinel pairs to be used instead of requiring that both iterators be of the same type and also allowing interoperability with the objects provided by the ranges header without requiring the user to manually extract the iterators.
Checks if a given predicate evaluates to true for some amount of objects in the range, or returns the amount of objects that do Compares two ranges for some property Finds the first or last position in a range where the subsequent elements satisfy some predicate Provides Binary search operations on ranges.