MCPcopy Create free account
hub / github.com/ablab/spades / insert_or_assign

Method insert_or_assign

ext/include/tsl/array-hash/array_hash.h:1103–1111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1101
1102 template <class M>
1103 std::pair<iterator, bool> insert_or_assign(const CharT* key,
1104 size_type key_size, M&& obj) {
1105 auto it = emplace(key, key_size, std::forward<M>(obj));
1106 if (!it.second) {
1107 it.first.value() = std::forward<M>(obj);
1108 }
1109
1110 return it;
1111 }
1112
1113 iterator erase(const_iterator pos) {
1114 if (should_clear_old_erased_values()) {

Callers

nothing calls this directly

Calls 2

emplaceFunction · 0.85
valueMethod · 0.45

Tested by

no test coverage detected