object::try_at
Access the specified element, with bounds checking.
Synopsis
boost::system::result< value & >
try_at(
string_view key) noexcept; (1)
boost::system::result< value const & >
try_at(
string_view key) const noexcept; (2)
Description
Returns boost::system::result
containing a reference to the mapped value of the element that matches key
. Otherwise the result contains an error_code
.
Exception Safety
No-throw guarantee.
Parameters
Name | Description |
---|---|
|
The key of the element to find. |
Complexity
Constant on average, worst case linear in size()
.