|
tenno 0.1.0
|
An expected value. More...
#include <expected.hpp>
Public Member Functions | |
| constexpr | expected (const T val_in) |
| constexpr | expected (const unexpected< E > unex_val) |
| constexpr | operator bool () const noexcept |
| constexpr bool | operator== (const expected< T, E > &other) const noexcept |
| constexpr bool | operator!= (const expected< T, E > &other) const noexcept |
| constexpr auto | operator= (const expected< T, E > &other) noexcept -> expected< T, E > & |
| constexpr bool | has_value () const noexcept |
| constexpr T | value () const noexcept |
| constexpr E | error () const noexcept |
| constexpr T | value_or (const T default_val) const noexcept |
| Returns the value of the expected object or a default value. | |
| constexpr E | error_or (const E default_err) const noexcept |
| Returns the unexpected value of the expected object or a default value. | |
Data Fields | |
| bool | has_val |
| const T | val |
| const unexpected< E > | unex |
An expected value.
| T | The type of the expected value |
| E | The type of the unexpected value |
Definition at line 37 of file expected.hpp.
|
inlineconstexpr |
Definition at line 44 of file expected.hpp.
|
inlineconstexpr |
Definition at line 48 of file expected.hpp.
|
inlineconstexprnoexcept |
Definition at line 95 of file expected.hpp.
|
inlineconstexprnoexcept |
Returns the unexpected value of the expected object or a default value.
| default_err | The default value to return if the expected object does not have an unexpected value |
Definition at line 125 of file expected.hpp.
|
inlineconstexprnoexcept |
Definition at line 85 of file expected.hpp.
|
inlineexplicitconstexprnoexcept |
Definition at line 53 of file expected.hpp.
|
inlineconstexprnoexcept |
Definition at line 71 of file expected.hpp.
|
inlineconstexprnoexcept |
Definition at line 76 of file expected.hpp.
|
inlineconstexprnoexcept |
Definition at line 58 of file expected.hpp.
|
inlineconstexprnoexcept |
Definition at line 90 of file expected.hpp.
|
inlineconstexprnoexcept |
Returns the value of the expected object or a default value.
| default_val | The default value to return if the expected object does not have a value |
Definition at line 107 of file expected.hpp.
| bool tenno::expected< T, E >::has_val |
Definition at line 40 of file expected.hpp.
| const unexpected<E> tenno::expected< T, E >::unex |
Definition at line 42 of file expected.hpp.
| const T tenno::expected< T, E >::val |
Definition at line 41 of file expected.hpp.