mirror of
https://github.com/Z3Prover/z3
synced 2025-04-07 18:05:21 +00:00
use static_assert in COMPILE_TIME_ASSERT
This commit is contained in:
parent
2473c69679
commit
632c2d8ebf
|
@ -90,14 +90,7 @@ bool is_debug_enabled(const char * tag);
|
|||
exit(-1); \
|
||||
}
|
||||
|
||||
#define MAKE_NAME2(LINE) zofty_ ## LINE
|
||||
#define MAKE_NAME(LINE) MAKE_NAME2(LINE)
|
||||
#define DBG_UNIQUE_NAME MAKE_NAME(__LINE__)
|
||||
#ifdef __GNUC__
|
||||
#define COMPILE_TIME_ASSERT(expr) extern __attribute__((unused)) char DBG_UNIQUE_NAME[expr]
|
||||
#else
|
||||
#define COMPILE_TIME_ASSERT(expr) extern char DBG_UNIQUE_NAME[expr]
|
||||
#endif
|
||||
#define COMPILE_TIME_ASSERT(expr) static_assert(expr, "")
|
||||
|
||||
void finalize_debug();
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue