Template Struct error
Defined in File expected.hpp
Struct Documentation
-
template<typename T>
struct error helper struct to create an expected which is signalling an error more easily
- Param T:
type which the success helper class should contain
cxx::expected<float> callMe() { //... return cxx::error<float>(12.34f); }
Public Functions
-
error(const T &t) noexcept
constructor which creates a error helper class by copying the value of t
- Parameters:
t – [in] value which should be later stored in an expected