MCPcopy Create free account
hub / github.com/ceph/ceph / erase_if

Function erase_if

src/include/cpp-btree/btree_map.h:97–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95// Erases all elements that satisfy the predicate pred from the container.
96template <typename K, typename V, typename C, typename A, typename Pred>
97void erase_if(btree_map<K, V, C, A> &map, Pred pred) {
98 for (auto it = map.begin(); it != map.end();) {
99 if (pred(*it)) {
100 it = map.erase(it);
101 } else {
102 ++it;
103 }
104 }
105}
106
107// btree::btree_multimap
108//

Callers

nothing calls this directly

Calls 3

beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected