35 #define NO_ABORT_CODE 0
37 #define MEMORY_ABORT 2
40 #if !defined(__GNUC__) && !defined(__attribute__)
41 # define __attribute__(attr)
50 const char *format, ...
52 constexpr
ERRCODE(
const char *
string) : message(string) {}
57 #define DO_NOTHING static_cast<void>(0)
59 #define ASSERT_HOST(x) \
60 (x) ? DO_NOTHING : ASSERT_FAILED.error(#x, ABORT, "in file %s, line %d", __FILE__, __LINE__)
62 #define ASSERT_HOST_MSG(x, ...) \
64 tprintf(__VA_ARGS__); \
65 ASSERT_FAILED.error(#x, ABORT, "in file %s, line %d", __FILE__, __LINE__); \
#define __attribute__(attr)
constexpr ERRCODE ASSERT_FAILED("Assert failed")
void constexpr ERRCODE(const char *string)