void specialization that represents success by an empty optional.
More...
#include <expected.h>
template<typename E>
class quicr::Expected< void, E >
void specialization that represents success by an empty optional.
- Template Parameters
-
◆ Expected() [1/3]
Constructs a successful result.
◆ Expected() [2/3]
template<typename E >
template<typename U >
Constructs an error result.
- Template Parameters
-
- Parameters
-
| value | Value forwarded to the stored error. |
◆ Expected() [3/3]
template<typename E >
template<typename U >
Constructs an error result from an unexpected value.
- Template Parameters
-
| U | Error source type convertible to E. |
- Parameters
-
| unex | Wrapper whose error is copied into this result. |
◆ error()
- Returns
- A reference to the stored error.
- Exceptions
-
| std::bad_optional_access | If this object represents success. |
◆ has_value()
- Returns
true when no error is stored.
◆ operator bool()
The documentation for this class was generated from the following file: