Navigation :
Prerequisites
Build and install
Review of Error Handling Frameworks
Motivation
Future ABI stability guarantees
Tutorial
Recipes
Experimental
API reference
-
Macros
-
Concepts
-
Converters
-
Traits
-
Policies
-
Types
-
Aliases
-
Functions
--
Hooks
--
Iostream
--
Policy
--- `auto basic_outcome_failure_exception_from_error(const EC &)`
--- `decltype(auto) error_code(T &&)`
--- `decltype(auto) exception_ptr(T &&)`
--- `void outcome_throw_as_system_error_with_payload(BoostErrorCodeEnum &&)`
--- `void outcome_throw_as_system_error_with_payload(ErrorCodeEnum &&)`
--- `void outcome_throw_as_system_error_with_payload(const boost::system::error_code &)`
--- `void outcome_throw_as_system_error_with_payload(const std::error_code &)`
-- `auto failure(T &&, ...)`
-- `auto success(T &&, ...)`
-- `bool try_operation_has_value(X)`
-- `decltype(auto) try_operation_extract_value(X)`
-- `decltype(auto) try_operation_return_as(X)`
-- `std::error_code error_from_exception(std::exception_ptr &&ep = std::current_exception(), std::error_code not_matched = std::make_error_code(std::errc::resource_unavailable_try_again)) noexcept`
-- `void strong_swap(bool &all_good, T &a, T &b)`
-- `void try_throw_std_exception_from_error(std::error_code ec, const std::string &msg = std::string{})`
Frequently asked questions
Videos
Changelog
History
void outcome_throw_as_system_error_with_payload(ErrorCodeEnum &&)
A specialisation of outcome_throw_as_system_error_with_payload()
for types where std::is_error_code_enum<ErrorCodeEnum>
or std::is_error_condition_enum<ErrorCodeEnum>
is true. This executes OUTCOME_THROW_EXCEPTION(expr)
with a
std::system_error
constructed from the result of the ADL discovered free function make_error_code(ErrorCodeEnum)
.
Overridable : Argument dependent lookup.
Requires : Either
std::is_error_code_enum<T>
or
std::is_error_condition_enum<T>
to be true for a decayed ErrorCodeEnum
.
Namespace : std
Header : <outcome/std_result.hpp>