Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
value::try_at (2 of 4 overloads)

Access an element, with bounds checking.

Synopsis
boost::system::result< value const & >
try_at(
    string_view key) const noexcept;
Description

Returns boost::system::result containing a reference to the element of the underlying object, if pos is within its range. If pos is outside of that range, or the underlying value is not an object the result contains an error_code.

Exception Safety

No-throw guarantee.

Parameters

Name

Description

key

The key of the element to find.

Complexity

Constant.


PrevUpHomeNext