| 12608 | typename KeyType, |
| 12609 | detail::enable_if_t<detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value, int> = 0> |
| 12610 | std::pair<iterator, bool> emplace(KeyType&& key, const mapped_type& value) noexcept { |
| 12611 | for (auto itr = this->begin(); itr != this->end(); ++itr) { |
| 12612 | if (m_compare(itr->first, key)) { |
| 12613 | return {itr, false}; |
| 12614 | } |
| 12615 | } |
| 12616 | this->emplace_back(std::forward<KeyType>(key), value); |
| 12617 | return {std::prev(this->end()), true}; |
| 12618 | } |
| 12619 | |
| 12620 | /// @brief Find a value associated to the given key. Throws an exception if the search fails. |
| 12621 | /// @tparam KeyType A type for the input key. |
no test coverage detected