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 develop branch, built from commit e7590a0093.
PrevUpHomeNext
value::try_at (4 of 4 overloads)

Access an element, with bounds checking.

Synopsis
boost::system::result< value const & >
try_at(
    std::size_t pos) const noexcept;
Description

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

Exception Safety

No-throw guarantee.

Parameters

Name

Description

pos

A zero-based array index.

Complexity

Constant.


PrevUpHomeNext