2022-11-15 18:36:50 +00:00
|
|
|
#pragma once
|
2022-11-19 16:20:10 +00:00
|
|
|
#include <Attributes.h>
|
2022-11-15 18:36:50 +00:00
|
|
|
|
2022-11-19 16:20:10 +00:00
|
|
|
extern _noreturn bool __check_failed(const char* file, const char* line, const char* func, const char* expr);
|
2022-11-15 18:36:50 +00:00
|
|
|
|
|
|
|
#define STRINGIZE(x) #x
|
|
|
|
#define STRINGIZE_VALUE_OF(x) STRINGIZE(x)
|
|
|
|
|
2022-11-19 16:20:10 +00:00
|
|
|
#define check(expr) (expr) || __check_failed(__FILE__, STRINGIZE_VALUE_OF(__LINE__), __PRETTY_FUNCTION__, #expr)
|