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 an old version of Boost. Click here to view this page for the latest version.
Prev Up HomeNext

const error_type &assume_error() const & noexcept

Narrow contract const lvalue reference observer of the stored error. NoValuePolicy::narrow_error_check() is first invoked, then the reference to the error is returned. As a valid default constructed error is always present, no undefined behaviour occurs unless NoValuePolicy::narrow_error_check() does that.

Note that if error_type is void, only a const overload returning void is present.

Requires: Always available.

Complexity: Depends on NoValuePolicy::narrow_error_check().

Guarantees: An exception is never thrown.

Last revised: February 12, 2019 at 16:36:24 UTC


Prev Up HomeNext