mrdocs::polyfill::expected
A container holding an error or a value.
Synopsis
Declared in <mrdocs/polyfill/expected.hpp>
template<
class T,
class E>
class expected;
Type Aliases
Name |
Description |
Type produced on failure. |
|
Rebind to an |
|
Convenience alias for an unexpected containing the error type. |
|
Type produced on success. |
Member Functions
Name |
Description |
|
Constructors |
|
Destructors |
Assignment operators |
|
|
|
|
|
Access the stored error; precondition: !has_value(). |
|
|
|
Return true when the expected contains a value. |
|
Dereference operators |
|
Access value members through pointer syntax. |
|
|
|
Swap the stored state with another expected. |
|
|
|
|
|
|
|
|
|
Return true when the expected contains a value. |
Data Members
Name |
Description |
|
Storage for the unexpected error. |
|
Storage for the engaged value. |
Specializations
Name |
Description |
expected specialization for |
|
expected specialization for lvalue references. Holds either a bound reference to |
Friends
Name |
Description |
Swap contents with another expected. |
|
Equality operator |
|
Equality operator |
|
Equality operator |
|
|
A container holding an error or a value. |
Created with MrDocs