Zen C++ Libraries
Zero-dependency re-usable components for C++
Loading...
Searching...
No Matches
error.hpp
1#ifndef ZEN_ERROR_HPP
2#define ZEN_ERROR_HPP
3
4#include <variant>
5
6#include "zen/config.hpp"
7#include "zen/either.hpp"
8
9ZEN_NAMESPACE_START
10
13
16
19
22
23using error = std::variant<
28>;
29
30template<typename T>
31using result = either<error, T>;
32
33ZEN_NAMESPACE_END
34
35#endif // #ifndef ZEN_ERROR_HPP
36
A type for computations that may fail.
Definition either.hpp:124
Encapsulation for computations that may fail.
Definition error.hpp:20
Definition error.hpp:14
Definition error.hpp:11
Definition error.hpp:17