Back to Arangodb

Functions

3rdParty/boost/1.78.0/libs/outcome/doc/html/reference/functions.html

3.12.9.18.4 KB
Original Source

Functions

  1. Hooks

Functions used to hook into the functionality of basic_result and basic_outcome.

  1. uint16_t spare_storage(const basic_result|basic_outcome *) noexcept

Returns the sixteen bits of spare storage in the specified result or outcome.

  1. void hook_outcome_construction(T *, U &&) noexcept

(Until v2.2.0) ADL discovered free function hook invoked by the implicit constructors of basic_outcome.

  1. void hook_outcome_construction(T *, U &&, V &&) noexcept

(Until v2.2.0) ADL discovered free function hook invoked by the implicit constructors of basic_outcome.

  1. void hook_outcome_copy_construction(T *, U &&) noexcept

(Until v2.2.0) ADL discovered free function hook invoked by the converting copy constructors of basic_outcome.

  1. void hook_outcome_copy_construction(T *, U &&, V &&) noexcept

(Until v2.2.0) ADL discovered free function hook invoked by the converting copy constructors of basic_outcome.

  1. void hook_outcome_in_place_construction(T *, in_place_type_t<U>, Args &&...) noexcept

(Until v2.2.0) ADL discovered free function hook invoked by the in-place constructors of basic_outcome.

  1. void hook_outcome_move_construction(T *, U &&) noexcept

(Until v2.2.0) ADL discovered free function hook invoked by the converting move constructors of basic_outcome.

  1. void hook_outcome_move_construction(T *, U &&, V &&) noexcept

(Until v2.2.0) ADL discovered free function hook invoked by the converting move constructors of basic_outcome.

  1. void hook_result_construction(T *, U &&) noexcept

(Until v2.2.0) ADL discovered free function hook invoked by the implicit constructors of basic_result.

  1. void hook_result_copy_construction(T *, U &&) noexcept

(Until v2.2.0) ADL discovered free function hook invoked by the converting copy constructors of basic_result.

  1. void hook_result_in_place_construction(T *, in_place_type_t<U>, Args &&...) noexcept

(Until v2.2.0) ADL discovered free function hook invoked by the in-place constructors of basic_result.

  1. void hook_result_move_construction(T *, U &&) noexcept

(Until v2.2.0) ADL discovered free function hook invoked by the converting move constructors of basic_result.

  1. void override_outcome_exception(basic_outcome<T, EC, EP, NoValuePolicy> *, U &&) noexcept

Overrides the exception to something other than what was constructed.

  1. void set_spare_storage(basic_result|basic_outcome *, uint16_t) noexcept

Sets the sixteen bits of spare storage in the specified result or outcome.

  1. Iostream

Functions used to print, serialise and deserialise basic_result and basic_outcome.

  1. std::istream &operator>>(std::istream &, basic_outcome<T, EC, EP, NoValuePolicy> &)

Deserialises a basic_outcome from a std::istream.

  1. std::istream &operator>>(std::istream &, basic_result<T, E, NoValuePolicy> &)

Deserialises a basic_result from a std::istream.

  1. std::ostream &operator<<(std::ostream &, const basic_outcome<T, EC, EP, NoValuePolicy> &)

Serialises a basic_outcome to a std::ostream.

  1. std::ostream &operator<<(std::ostream &, const basic_result<T, E, NoValuePolicy> &)

Serialises a basic_result to a std::ostream.

  1. std::string print(const basic_outcome<T, EC, EP, NoValuePolicy> &)

Returns a string containing a human readable rendition of the basic_outcome.

  1. std::string print(const basic_result<T, E, NoValuePolicy> &)

Returns a string containing a human readable rendition of the basic_result.

  1. Policy

Functions used to customise how the policy classes operate.

  1. auto basic_outcome_failure_exception_from_error(const EC &)

ADL discovered free function synthesising an exception type from an error type, used by the .failure() observers.

  1. decltype(auto) error_code(T &&)

Extracts a boost::system::error_code or std::error_code from the input via ADL discovery of a suitable make_error_code(T) function.

  1. decltype(auto) exception_ptr(T &&)

Extracts a boost::exception_ptr or std::exception_ptr from the input via ADL discovery of a suitable make_exception_ptr(T) function.

  1. void outcome_throw_as_system_error_with_payload(BoostErrorCodeEnum &&)

Specialisation of outcome_throw_as_system_error_with_payload() for input types where boost::system::is_error_code_enum<BoostErrorCodeEnum> or boost::system::is_error_condition_enum<BoostErrorCodeEnum> is true.

  1. void outcome_throw_as_system_error_with_payload(ErrorCodeEnum &&)

Specialisation of outcome_throw_as_system_error_with_payload() for input types where std::is_error_code_enum<ErrorCodeEnum> or std::is_error_condition_enum<ErrorCodeEnum> is true.

  1. void outcome_throw_as_system_error_with_payload(const boost::system::error_code &)

Specialisation of outcome_throw_as_system_error_with_payload() for boost::system::error_code.

  1. void outcome_throw_as_system_error_with_payload(const std::error_code &)

Specialisation of outcome_throw_as_system_error_with_payload() for std::error_code.

  1. auto failure(T &&, ...)

Returns appropriate type sugar for constructing an unsuccessful result or outcome.

  1. auto success(T &&, ...)

Returns appropriate type sugar for constructing a successful result or outcome.

  1. bool try_operation_has_value(X)

Default implementation of try_operation_has_value(X) ADL customisation point for BOOST_OUTCOME_TRY.

  1. decltype(auto) try_operation_extract_value(X)

Default implementation of try_operation_extract_value(X) ADL customisation point for BOOST_OUTCOME_TRY.

  1. decltype(auto) try_operation_return_as(X)

Default implementation of try_operation_return_as(X) ADL customisation point for BOOST_OUTCOME_TRY.

  1. 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

Returns an error code matching a thrown standard library exception.

  1. void strong_swap(bool &all_good, T &a, T &b)

Tries to perform a strong guarantee swap.

  1. void try_throw_std_exception_from_error(std::error_code ec, const std::string &msg = std::string{})

Try to throw a standard library exception type matching an error code.