std::map::at
T& at( const Key& key ); | (1) | (since C++11) |
|---|---|---|
const T& at( const Key& key ) const; | (2) | (since C++11) |
返回对元素映射值的引用,其键等价于key如果不存在这类元素,则为类型的例外。std::out_of_range被扔了。
参数
key | - | the key of the element to find |
|---|
返回值
引用所请求元素的映射值。
例外
std::out_of_range如果容器没有具有指定key...
复杂性
容器大小的对数。
另见
operator[] | access specified element (public member function) |
|---|
© cppreference.com在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com

