Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the master branch, built from commit c6a8213e9b.
PrevUpHomeNext
object::at (1 of 3 overloads)

Access the specified element, with bounds checking.

Synopsis
value&
at(
    string_view key);
Description

Returns a reference to the mapped value of the element that matches key, otherwise throws.

Complexity

Constant on average, worst case linear in size().

Exception Safety

Strong guarantee.

Return Value

A reference to the mapped value.

Parameters

Name

Description

key

The key of the element to find.

Exceptions

Type

Thrown On

boost::system::system_error

if no such element exists.


PrevUpHomeNext