#include <assert.h>
#include <string>
Go to the source code of this file.
◆ OR_FATAL
Value: ({ \
decltype(expr)&& __or_fatal_expr = (expr); \
ok_or_fail; \
if (!ok_or_fail::IsOk(__or_fatal_expr)) { \
fprintf(stderr, "%s:%d: assertion \"%s\" failed", __FILE__, __LINE__, \
ok_or_fail::ErrorMessage(__or_fatal_expr).c_str()); \
abort(); \
} \
ok_or_fail::Unwrap(std::move(__or_fatal_expr)); \
})
◆ OR_RETURN
#define OR_RETURN |
( |
|
expr | ) |
|
Value: ({ \
decltype(expr)&& __or_return_expr = (expr); \
ok_or_fail; \
if (!ok_or_fail::IsOk(__or_return_expr)) { \
return ok_or_fail::Fail(std::move(__or_return_expr)); \
} \
ok_or_fail::Unwrap(std::move(__or_return_expr)); \
})