23 Containers library [containers]

23.5 Unordered associative containers [unord]

23.5.3 Class template unordered_map [unord.map]

23.5.3.3 Element access [unord.map.elem]

mapped_type& operator[](const key_type& k);
Effects: Equivalent to: return try_emplace(k).first->second;
mapped_type& operator[](key_type&& k);
Effects: Equivalent to: return try_emplace(std​::​move(k)).first->second;
template<class K> mapped_type& operator[](K&& k);
Constraints: The qualified-ids Hash​::​is_transparent and Pred​::​is_transparent are valid and denote types.
Effects: Equivalent to: return try_emplace(std​::​forward<K>(k)).first->second;
mapped_type& at(const key_type& k); const mapped_type& at(const key_type& k) const;
Returns: A reference to x.second, where x is the (unique) element whose key is equivalent to k.
Throws: An exception object of type out_of_range if no such element is present.
template<class K> mapped_type& at(const K& k); template<class K> const mapped_type& at(const K& k) const;
Constraints: The qualified-ids Hash​::​is_transparent and Pred​::​is_transparent are valid and denote types.
Preconditions: The expression find(k) is well-formed and has well-defined behavior.
Returns: A reference to find(k)->second.
Throws: An exception object of type out_of_range if find(k) == end() is true.