Daily bit(e) of C++ | std::adjacent_find
Daily bit(e) of C++ ♻️17, The linear find algorithm that will return the first adjacent pair of elements that satisfy a predicate: std::adjacent_find.
The std::adjacent_find is a linear find algorithm that returns an iterator to the first pair of adjacent elements that satisfy the provided binary predicate.
The iterator will point to the first of the two elements.
The algorithm has both the C++17 parallel execution variant and the C++20 ranges version.