Add a comment about waiting to kill the event thread
[openal-soft.git] / common / static_assert.h
blobbf0ce065735cc5655c8002c250384ac03b51cd90
1 #ifndef AL_STATIC_ASSERT_H
2 #define AL_STATIC_ASSERT_H
4 #include <assert.h>
7 #ifndef static_assert
8 #ifdef HAVE_C11_STATIC_ASSERT
9 #define static_assert _Static_assert
10 #else
11 #define CTASTR2(_pre,_post) _pre##_post
12 #define CTASTR(_pre,_post) CTASTR2(_pre,_post)
13 #if defined(__COUNTER__)
14 #define static_assert(_cond, _msg) typedef struct { int CTASTR(static_assert_failed_at_line_,__LINE__) : !!(_cond); } CTASTR(static_assertion_,__COUNTER__)
15 #else
16 #define static_assert(_cond, _msg) struct { int CTASTR(static_assert_failed_at_line_,__LINE__) : !!(_cond); }
17 #endif
18 #endif
19 #endif
21 #endif /* AL_STATIC_ASSERT_H */