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
auto basic_outcome_failure_exception_from_error(const EC &)
Synthesises an exception type from an error type, used by the exception_type failure() const noexcept
observers. ADL discovered. 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.
Overridable : Argument dependent lookup.
Requires : Nothing.
Namespace : Namespace of EC
type.
Header : <outcome/std_outcome.hpp>
, <outcome/boost_outcome.hpp>