accesses the element with the given key, with bounds checking
Declared in <nlohmann/ordered_map.hpp>
template<class KeyType>
requires detail::is_usable_as_key_type<key_compare, key_type, KeyType>::value
T const&
at(KeyType&& key) const;
| Name | Thrown on |
|---|---|
std::out_of_range | if the container does not have an element with the given key |
const reference to the value associated with key
| Name | Description |
|---|---|
| key [in] | key of the element to access |