|
tdslite latest
C++ API reference
|
Barebones* expected implementation (*not exactly standard compliant) More...
#include <tdslite/util/tdsl_expected.hpp>
Public Member Functions | |
| auto | operator-> () noexcept -> maw |
| auto | operator* () noexcept -> ST & |
| Dereference (star) operator overload. | |
| expected (ST &&expected) | |
| Construct a new expected object. | |
| expected< ST, ET > & | operator= (const expected< ST, ET > &other) |
| expected (const expected< ST, ET > &other) | |
| expected (expected< ST, ET > &&other) | |
| template<typename T > | |
| expected (detail::unexpected_wrapper< T > &&ue) | |
| Unexpected constructor. | |
| ~expected () | |
| bool | has_value () const noexcept |
| operator bool () const noexcept | |
| ST & | get () & |
| const ST & | get () const & |
| ST && | get () && |
| const ST && | get () const && |
| ET & | error () & |
| const ET & | error () const & |
| ET && | error () && |
| const ET && | error () const && |
Public Attributes | ||
| union { | ||
| ST value | ||
| ET unexpected_value {} | ||
| }; | ||
| bool | has_expected = {false} | |
Barebones* expected implementation (*not exactly standard compliant)
| ST | Success data type |
| ET | Error data type |
|
inline |
Construct a new expected object.
| [in] | expected | The expected value |
|
inline |
|
inline |
|
inline |
Unexpected constructor.
| T | The unexpected type |
| ue | An instance of unexpected_wrapper<T> type |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
Dereference (star) operator overload.
|
inline |
|
inlinenoexcept |
|
inlineexplicitnoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| ST tdsl::expected< ST, ET >::value |
| ET tdsl::expected< ST, ET >::unexpected_value {} |
| union { ... } tdsl::expected< ST, ET > |
| bool tdsl::expected< ST, ET >::has_expected = {false} |