|
| | Result (Result &&other) noexcept(std::is_nothrow_move_constructible_v< Variant >)=default |
| |
| | Result (const Result &other) noexcept(std::is_nothrow_copy_constructible_v< Variant >)=default |
| |
| Result & | operator= (Result &&other) noexcept(std::is_nothrow_move_assignable_v< Variant >)=default |
| |
| Result & | operator= (const Result &other) noexcept(std::is_nothrow_copy_assignable_v< Variant >)=default |
| |
| template<typename... Args, typename = std::enable_if_t<(sizeof...(Args) > 1 || !std::is_same_v<std::decay_t<head_t<Args&&...>>, Result>), void>> |
| | Result (Args &&... args) noexcept(std::is_nothrow_constructible_v< Variant, std::in_place_type_t< V >, Args &&... >) |
| |
| template<typename... Args> |
| | Result (std::in_place_t, Args &&... args) noexcept(std::is_nothrow_constructible_v< Variant, std::in_place_type_t< V >, Args &&... >) |
| |
| | Result (std::exception_ptr exception) noexcept |
| |
| | Result (E error) noexcept |
| |
| | Result (StopTag tag) noexcept |
| |
| | Result () noexcept |
| |
| template<typename Arg , typename = std::enable_if_t<!is_result_v<std::decay_t<Arg>>, void>> |
| Result & | operator= (Arg &&arg) noexcept(std::is_nothrow_assignable_v< Variant, Arg >) |
| |
| | operator bool () const noexcept |
| |
| void | Ok () &=delete |
| |
| void | Ok () const &&=delete |
| |
| void | Value () &=delete |
| |
| void | Value () const &&=delete |
| |
| void | Exception () &=delete |
| |
| void | Exception () const &&=delete |
| |
| void | Error () &=delete |
| |
| void | Error () const &&=delete |
| |
| V && | Ok () && |
| |
| const V & | Ok () const & |
| |
| ResultState | State () const noexcept |
| |
| V && | Value () &&noexcept |
| |
| const V & | Value () const &noexcept |
| |
| std::exception_ptr && | Exception () &&noexcept |
| |
| const std::exception_ptr & | Exception () const &noexcept |
| |
| E && | Error () &&noexcept |
| |
| const E & | Error () const &noexcept |
| |
| Variant & | Internal () |
| |
| const Variant & | Internal () const |
| |
Encapsulated return value from caller.
- Template Parameters
-
| ValueT | type of value that stored in Result |
| E | type of error that stored in Result |
- Examples
- simple.cpp.
Definition at line 90 of file result.hpp.