MCPcopy Create free account
hub / github.com/AllentDan/LibtorchSegmentation / emplace

Method emplace

src/utils/json.hpp:16424–16435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16422 : Container{init, alloc} {}
16423
16424 std::pair<iterator, bool> emplace(const key_type& key, T&& t)
16425 {
16426 for (auto it = this->begin(); it != this->end(); ++it)
16427 {
16428 if (it->first == key)
16429 {
16430 return {it, false};
16431 }
16432 }
16433 Container::emplace_back(key, t);
16434 return {--this->end(), true};
16435 }
16436
16437 T& operator[](const Key& key)
16438 {

Callers 3

from_jsonFunction · 0.80
basic_jsonFunction · 0.80
emplaceFunction · 0.80

Calls 3

emplace_backFunction · 0.85
beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected