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

default_policy<T, EC, EP>

A type alias to a no-value policy selected based on traits matching of T, EC and EP. It is defined as follows:

  1. If EC and EP is void, choose terminate .

  2. If is_error_code_available<T> true for EC, choose error_code_throw_as_system_error<T, EC, EP> for basic_outcome or error_code_throw_as_system_error<T, EC, void> for basic_result.

  3. If is_exception_ptr_available<T> true for EC or EP, choose exception_ptr_rethrow<T, EC, EP> for basic_outcome or exception_ptr_rethrow<T, EC, void> for basic_result.

  4. Else choose fail_to_compile_observers , which fails the build with a useful message.


Header: <boost/outcome/std_result.hpp>

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

Prev Up HomeNext