Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Prev Up HomeNext

error_code_throw_as_system_error<T, EC, EP>

Note: This policy class specialisation can only be used with basic_outcome, not basic_result. Use error_code_throw_as_system_error<T, EC, void> with basic_result.

Policy class defining that on incorrect wide value observation, EP ought to be rethrown if possible, then the ADL discovered free function outcome_throw_as_system_error_with_payload(impl.assume_error()) should be called. Some precanned overloads of that function are listed here.

Incorrect wide error observation performs:

BOOST_OUTCOME_THROW_EXCEPTION(bad_outcome_access("no error"));

Incorrect wide exception observation performs:

BOOST_OUTCOME_THROW_EXCEPTION(bad_outcome_access("no exception"));

Inherits publicly from base , and its narrow value, error and exception observer policies are inherited from there.

Requires: Nothing.


Header: <boost/outcome/policy/outcome_error_code_throw_as_system_error.hpp>

Last revised: February 01, 2019 at 23:42:52 UTC

Prev Up HomeNext