MCPcopy Create free account
hub / github.com/HelenOS/helenos / adjacent_find

Function adjacent_find

uspace/lib/cpp/include/__bits/algorithm.hpp:159–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157
158 template<class ForwardIterator>
159 ForwardIterator adjacent_find(ForwardIterator first, ForwardIterator last)
160 {
161 while (first != last)
162 {
163 if (*first == *(first + 1))
164 return first;
165 ++first;
166 }
167
168 return last;
169 }
170
171 template<class ForwardIterator, class Predicate>
172 ForwardIterator adjacent_find(ForwardIterator first, ForwardIterator last, Predicate pred)

Callers 1

test_non_modifyingMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_non_modifyingMethod · 0.68