5#include <boost/describe/enum.hpp>
6#include <boost/preprocessor/cat.hpp>
29#define TRYE_IMPL(val, e, ident) \
31 const auto& ident = val; \
32 if (!ident.has_value()) { \
33 using enum ErrorKind; \
39#define TRY_IMPL(val, ident) TRYE_IMPL(val, ident.error(), ident)
42#define TRYE(val, e) TRYE_IMPL(val, e, BOOST_PP_CAT(errref_uniq__, __COUNTER__))
46#define TRY(val) TRY_IMPL(val, BOOST_PP_CAT(errrefe_uniq__, __COUNTER__))
std::variant wrapper for a partial implementation of C++23's expected type
Definition expected.hpp:34
Definition asm_buffer.hpp:19
BOOST_DEFINE_ENUM_CLASS(ErrorKind, TimedOut, UnresolvedSymbol, UnexpectedReturn, UnknownError, SyscallFailure, MaxErrorNum)