MCPcopy Create free account
hub / github.com/Tessil/ordered-map / insert_or_assign

Method insert_or_assign

include/tsl/ordered_hash.h:674–681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

672
673 template <class K, class M>
674 std::pair<iterator, bool> insert_or_assign(K&& key, M&& value) {
675 auto it = try_emplace(std::forward<K>(key), std::forward<M>(value));
676 if (!it.second) {
677 it.first.value() = std::forward<M>(value);
678 }
679
680 return it;
681 }
682
683 template <class K, class M>
684 iterator insert_or_assign(const_iterator hint, K&& key, M&& obj) {

Callers

nothing calls this directly

Calls 2

KeySelectClass · 0.70
valueMethod · 0.45

Tested by

no test coverage detected