Navigation :
Prerequisites
Build and install
Motivation
Tutorial
Recipes
Experimental
API reference
-
Macros
-
Concepts
-
Converters
-
Traits
-
Policies
-
Types
-
Aliases
-
Functions
--
Hooks
--
Iostream
--
Policy
-- `auto failure(T &&, ...)`
-- `auto success(T &&)`
-- `auto try_operation_return_as(T &&)`
-- `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`
-- `std::experimental::unexpected<E> try_operation_return_as(std::experimental::expected<T, E>)`
-- `void try_throw_std_exception_from_error(std::error_code ec, const std::string &msg = std::string{})`
Frequently asked questions
Videos
Changelog
History
std::experimental::unexpected<E> try_operation_return_as(std::experimental::expected<T, E>)
This implementation of try_operation_return_as(expr)
returns an unexpected for any expected input. This allows the use of functions returning std::experimental::expected<T, E>
in OUTCOME_TRY(...)
.
Requires : Always available.
Namespace : OUTCOME_V2_NAMESPACE
Header : <outcome/try.hpp>