MCPcopy Create free account
hub / github.com/IntegralPilot/wasm_os / remove

Function remove

stdlib/cpp/algorithm.hpp:21–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19 // The remove algorithm
20 template <class ForwardIterator, class T>
21 ForwardIterator remove(ForwardIterator first, ForwardIterator last, const T& value) {
22 first = std::find(first, last, value);
23 if (first == last) return first;
24 ForwardIterator i = first;
25 ++i;
26 while (i != last) {
27 if (*i != value) {
28 *first++ = std::move(*i);
29 }
30 ++i;
31 }
32 return first;
33 }
34}
35
36#endif

Callers

nothing calls this directly

Calls 2

findFunction · 0.85
moveFunction · 0.85

Tested by

no test coverage detected