Template Class Expected< void >#
Defined in File expected.h
Class Documentation#
-
template<>
class Expected<void># Specialization of Expected for a successful operation without a value.
Expected<void> stores FFI None when successful and an Error when unsuccessful. A successful value is constructed with the default constructor, and value validates success without returning a value.
Public Functions
-
Expected() = default#
Construct a successful Expected<void>.
-
inline Expected(Error error)#
Implicit constructor from an error.
- Parameters:
error – The error value.
-
template<typename E, typename = std::enable_if_t<std::is_base_of_v<Error, std::remove_cv_t<E>>>>
inline Expected(Unexpected<E> unexpected)# Implicit constructor from an Unexpected wrapper.
-
inline int32_t type_index() const noexcept#
Return the raw stored type index.
-
inline void value() const &#
Validate successful completion, or throw the contained error.
-
inline void value() &&#
Validate successful completion, or throw the contained error by move.
-
Expected() = default#