| 13 | namespace ArgumentParser { |
| 14 | |
| 15 | auto 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 | |
| 26 | auto KeywordActionMap::Find(cm::string_view name) const -> const_iterator |
| 27 | { |