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

Function copy_if

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

Source from the content-addressed store, hash-verified

368
369 template<class InputIterator, class OutputIterator, class Predicate>
370 OutputIterator copy_if(InputIterator first, InputIterator last,
371 OutputIterator result, Predicate pred)
372 {
373 while (first != last)
374 {
375 if (pred(*first))
376 *result++ = *first;
377 ++first;
378 }
379
380 return result;
381 }
382
383 template<class BidirectionalIterator1, class BidirectionalIterator2>
384 BidirectionalIterator2 copy_backward(BidirectionalIterator1 first, BidirectionalIterator1 last,

Callers 1

test_mutatingMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_mutatingMethod · 0.68