MCPcopy Create free account
hub / github.com/catboost/catboost / insert_or_assign

Method insert_or_assign

util/generic/hash.h:159–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157
158 template <class M>
159 std::pair<iterator, bool> insert_or_assign(const Key& k, M&& value) {
160 auto result = try_emplace(k, std::forward<M>(value));
161 if (!result.second) {
162 result.first->second = std::forward<M>(value);
163 }
164 return result;
165 }
166
167 template <class M>
168 std::pair<iterator, bool> insert_or_assign(Key&& k, M&& value) {

Callers 1

TestInsertOrAssignMethod · 0.45

Calls 1

moveFunction · 0.50

Tested by 1

TestInsertOrAssignMethod · 0.36