This commit is contained in:
hathach
2018-09-02 20:30:07 +07:00
parent cfdcd5fc39
commit 1a4a27324b
3 changed files with 11 additions and 5 deletions

View File

@@ -58,9 +58,8 @@
//--------------------------------------------------------------------+
// Compile-time Assert (use TU_VERIFY_STATIC to avoid name conflict)
//--------------------------------------------------------------------+
#if defined(__ICCARM__) || (__STDC_VERSION__ >= 201112L )
#include <assert.h>
#define TU_VERIFY_STATIC static_assert
#if __STDC_VERSION__ >= 201112L
#define TU_VERIFY_STATIC _Static_assert
#else
#define TU_VERIFY_STATIC(const_expr, _mess) enum { XSTRING_CONCAT_(_verify_static_, _TU_COUNTER_) = 1/(!!(const_expr)) }
#endif