MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / erase_iterator

Function erase_iterator

test/algorithm.cpp:42–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40
41template <class Container, class Iterator>
42static auto
43erase_iterator(Container& c, Iterator pos, Iterator last) -> decltype(c.erase_after(pos, last))
44{
45 auto n = std::distance(c.begin(), pos);
46 auto it = n == 0 ? c.before_begin() : std::next(c.begin(), n - 1);
47 return c.erase_after(it, last);
48}
49
50template <class Container, class Iterator>
51static auto erase_iterator(Container& c, Iterator pos, Iterator last) -> decltype(c.erase(pos,

Callers 1

Calls 3

distanceFunction · 0.85
eraseMethod · 0.80
beginMethod · 0.45

Tested by

no test coverage detected