MCPcopy Create free account
hub / github.com/Kitware/CMake / Emplace

Method Emplace

Source/cmArgumentParser.cxx:15–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13namespace ArgumentParser {
14
15auto KeywordActionMap::Emplace(cm::string_view name, KeywordAction action)
16 -> std::pair<iterator, bool>
17{
18 auto const it = std::lower_bound(
19 this->begin(), this->end(), name,
20 [](value_type const& elem, cm::string_view k) { return elem.first < k; });
21 return (it != this->end() && it->first == name)
22 ? std::make_pair(it, false)
23 : std::make_pair(this->emplace(it, name, std::move(action)), true);
24}
25
26auto KeywordActionMap::Find(cm::string_view name) const -> const_iterator
27{

Callers 2

MaybeBindMethod · 0.80
BindMethod · 0.80

Calls 4

moveFunction · 0.85
emplaceMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected