Template Class BadExpectedAccess#
Defined in File Expected.h
Class Documentation#
-
template<typename E>
class BadExpectedAccess# Defines a type of object to be thrown by TRAP::Expected::Value() when accessing an expected object that contains an unexpected value. BadExpectedAccess<E> stores a copy of the unexpected value.
Public Functions
-
inline explicit constexpr BadExpectedAccess(E e)#
Constructs a new BadExpectedAccess<E> object. Initializes the stored value with std::move(e).
-
inline constexpr E &Error() & noexcept#
Returns a reference to the stored value.
- Returns:
Reference to the stored value.
-
inline constexpr const E &Error() const & noexcept#
Returns a reference to the stored value.
- Returns:
Reference to the stored value.
-
inline explicit constexpr BadExpectedAccess(E e)#