MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / emplace

Function emplace

include/behaviortree_cpp/contrib/json.hpp:19058–19069  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19056 : Container{init, alloc} {}
19057
19058 std::pair<iterator, bool> emplace(const key_type& key, T&& t)
19059 {
19060 for (auto it = this->begin(); it != this->end(); ++it)
19061 {
19062 if (m_compare(it->first, key))
19063 {
19064 return {it, false};
19065 }
19066 }
19067 Container::emplace_back(key, std::forward<T>(t));
19068 return {std::prev(this->end()), true};
19069 }
19070
19071 template<class KeyType, detail::enable_if_t<
19072 detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>

Callers 2

json.hppFile · 0.70
insertFunction · 0.70

Calls 10

emplace_backFunction · 0.85
is_nullFunction · 0.85
is_objectFunction · 0.85
createFunction · 0.85
concatFunction · 0.85
set_parentFunction · 0.85
type_nameFunction · 0.70
beginFunction · 0.70
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected