Added STATIC_ASSERT() macro (from <Debug.h>, which cannot be included in the
kernel). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37087 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -53,6 +53,13 @@
|
|||||||
# define ASSERT_PRINT(x, format, args...) do { } while(0)
|
# define ASSERT_PRINT(x, format, args...) do { } while(0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define STATIC_ASSERT(x) \
|
||||||
|
do { \
|
||||||
|
struct __staticAssertStruct__ { \
|
||||||
|
char __static_assert_failed__[2*(x) - 1]; \
|
||||||
|
}; \
|
||||||
|
} while (false)
|
||||||
|
|
||||||
#if KDEBUG
|
#if KDEBUG
|
||||||
# define KDEBUG_ONLY(x) x
|
# define KDEBUG_ONLY(x) x
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user