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

exception_type failure() const noexcept

Synthesising observer of the stored exception or error. If an exception is available, returns a copy of that directly. If an error is available, and not an exception, an ADL discovered free function auto basic_outcome_failure_exception_from_error(const EC &) is invoked. Default overloads for this function are defined in Outcome for std::error_code and boost::system::error_code, these return std::make_exception_ptr(std::system_error(ec)) and boost::copy_exception(boost::system::system_error(ec)) respectively.

Requires: Both the traits is_error_code_available<T> and is_exception_ptr_available<T> are true.

Complexity: Depends on basic_outcome_failure_exception_from_error(const EC &).

Guarantees: Never throws. If an exception is thrown during the copy of the exception, that exception (from std::current_exception()) is returned instead.

Last revised: February 05, 2019 at 21:41:47 UTC


Prev Up HomeNext