Back to Arangodb

Policies

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

3.12.9.17.6 KB
Original Source

Policies

  1. base

Base class of most policy classes defining the narrow observer policies.

  1. static void _ub(Impl &&)

Special function which causes noticeable hard undefined behaviour.

  1. static bool _has_value(Impl &&) noexcept

Returns true if a value is present in the implementation passed in. Constexpr, never throws.

  1. static bool _has_error(Impl &&) noexcept

Returns true if an error is present in the implementation passed in. Constexpr, never throws.

  1. static bool _has_exception(Impl &&) noexcept

Returns true if an exception is present in the implementation passed in. Constexpr, never throws.

  1. static bool _has_error_is_errno(Impl &&) noexcept

Returns true if the error code in the implementation passed in has a domain or category matching that of POSIX errno. Constexpr, never throws.

  1. static auto &&_value(Impl &&) noexcept

Returns a reference to the value in the implementation passed in. Constexpr, never throws.

  1. static auto &&_error(Impl &&) noexcept

Returns a reference to the error in the implementation passed in. Constexpr, never throws.

  1. static auto &&_exception(Impl &&) noexcept

Returns a reference to the exception in the implementation passed in. Constexpr, never throws.

  1. static void _set_has_value(Impl &&, bool) noexcept

Sets whether the implementation has a value. Constexpr, never throws.

  1. static void _set_has_error(Impl &&, bool) noexcept

Sets whether the implementation has an error. Constexpr, never throws.

  1. static void _set_has_exception(Impl &&, bool) noexcept

Sets whether the implementation has an exception. Constexpr, never throws.

  1. static void _set_has_exception(Impl &&, bool) noexcept

Sets whether the implementation’s error code has a domain or category matching that of POSIX errno. Constexpr, never throws.

  1. static void narrow_value_check(Impl &&) noexcept

Observer policy performing hard UB if no value is present. Constexpr, never throws.

  1. static void narrow_error_check(Impl &&) noexcept

Observer policy performing hard UB if no error is present. Constexpr, never throws.

  1. static void narrow_exception_check(Impl &&) noexcept

Observer policy performing hard UB if no exception is present. Constexpr, never throws.

  1. static void on_outcome_construction(T *, U &&) noexcept

(>= Outcome v2.2.0) Hook invoked by the implicit constructors of basic_outcome.

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

(>= Outcome v2.2.0) Hook invoked by the implicit constructors of basic_outcome.

  1. static void on_outcome_copy_construction(T *, U &&) noexcept

(>= Outcome v2.2.0) Hook invoked by the converting copy constructors of basic_outcome.

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

(>= Outcome v2.2.0) Hook invoked by the converting copy constructors of basic_outcome.

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

(>= Outcome v2.2.0) Hook invoked by the in-place constructors of basic_outcome.

  1. static void on_outcome_move_construction(T *, U &&) noexcept

(>= Outcome v2.2.0) Hook invoked by the converting move constructors of basic_outcome.

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

(>= Outcome v2.2.0) Hook invoked by the converting move constructors of basic_outcome.

  1. static void on_result_construction(T *, U &&) noexcept

(>= Outcome v2.2.0) Hook invoked by the implicit constructors of basic_result.

  1. static void on_result_copy_construction(T *, U &&) noexcept

(>= Outcome v2.2.0) Hook invoked by the converting copy constructors of basic_result.

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

(>= Outcome v2.2.0) Hook invoked by the in-place constructors of basic_result.

  1. static void on_result_move_construction(T *, U &&) noexcept

(>= Outcome v2.2.0) Hook invoked by the converting move constructors of basic_result.

  1. all_narrow

Policy class defining that hard undefined behaviour should occur on incorrect narrow and wide value, error or exception observation. Inherits publicly from base.

  1. error_code_throw_as_system_error<T, EC, EP>

Policy class defining that EP ought to be rethrown if possible, then the ADL discovered free function outcome_throw_as_system_error_with_payload() should be called on incorrect wide value observation. Inherits publicly from base. Can only be used with basic_outcome.

  1. error_code_throw_as_system_error<T, EC, void>

Policy class defining that the ADL discovered free function outcome_throw_as_system_error_with_payload() should be called on incorrect wide value observation. Inherits publicly from base. Can only be used with basic_result.

  1. exception_ptr_rethrow<T, EC, EP>

Policy class defining that the ADL discovered free function rethrow_exception() should be called on incorrect wide value observation. Inherits publicly from base. Can only be used with basic_outcome.

  1. exception_ptr_rethrow<T, EC, void>

Policy class defining that the ADL discovered free function rethrow_exception() should be called on incorrect wide value observation. Inherits publicly from base. Can only be used with basic_result.

  1. fail_to_compile_observers

Policy class defining that a static assertion should occur upon compilation of the wide value, error or exception observation. Inherits publicly from base.

  1. terminate

Policy class defining that std::terminate() should be called on incorrect wide value, error or exception observation. Inherits publicly from base.

  1. throw_bad_result_access<EC>

Policy class defining that bad_result_access_with<EC> should be thrown on incorrect wide value observation. Inherits publicly from base.