MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / emplace

Function emplace

Source/external/json.hpp:18934–18945  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18932 : Container{init, alloc} {}
18933
18934 std::pair<iterator, bool> emplace(const key_type& key, T&& t)
18935 {
18936 for (auto it = this->begin(); it != this->end(); ++it)
18937 {
18938 if (m_compare(it->first, key))
18939 {
18940 return {it, false};
18941 }
18942 }
18943 Container::emplace_back(key, std::forward<T>(t));
18944 return {std::prev(this->end()), true};
18945 }
18946
18947 template<class KeyType, detail::enable_if_t<
18948 detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0>

Callers 2

json.hppFile · 0.85
insertFunction · 0.85

Calls 10

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

Tested by

no test coverage detected