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
--- `uint16_t spare_storage(const basic_result|basic_outcome *) noexcept`
--- `void hook_outcome_construction(T *, U &&) noexcept`
--- `void hook_outcome_construction(T *, U &&, V &&) noexcept`
--- `void hook_outcome_copy_construction(T *, U &&) noexcept`
--- `void hook_outcome_copy_construction(T *, U &&, V &&) noexcept`
--- `void hook_outcome_in_place_construction(T *, in_place_type_t<U>, Args &&...) noexcept`
--- `void hook_outcome_move_construction(T *, U &&) noexcept`
--- `void hook_outcome_move_construction(T *, U &&, V &&) noexcept`
--- `void hook_result_construction(T *, U &&) noexcept`
--- `void hook_result_copy_construction(T *, U &&) noexcept`
--- `void hook_result_in_place_construction(T *, in_place_type_t<U>, Args &&...) noexcept`
--- `void hook_result_move_construction(T *, U &&) noexcept`
--- `void override_outcome_exception(basic_outcome<T, EC, EP, NoValuePolicy> *, U &&) noexcept`
--- `void set_spare_storage(basic_result|basic_outcome *, uint16_t) noexcept`
--
Iostream
--
Policy
-- `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 hook_result_copy_construction(T *, U &&) noexcept
Removed in Outcome v2.2.0, unless OUTCOME_ENABLE_LEGACY_SUPPORT_FOR
is set to less than 220
to
enable emulation. Use on_result_copy_construction(T *, U &&) noexcept
instead in new code.
One of the constructor hooks for basic_result<T, E, NoValuePolicy>
, generally invoked by the converting copy constructors of basic_result
(NOT the standard copy constructor). See each constructor’s documentation to see which specific hook it invokes.
Overridable : By Argument Dependent Lookup.
Requires : Nothing.
Namespace : OUTCOME_V2_NAMESPACE::hooks
Header : <outcome/basic_result.hpp>