As of C++11 there is std::map::at which offers const and non-const access.
In contrast to operator[] it will throw an std::out_of_range exception if the element is not in the map.
As of C++11 there is std::map::at which offers const and non-const access.
In contrast to operator[] it will throw an std::out_of_range exception if the element is not in the map.