1234567891011121314151617181920212223 |
- #if (__cplusplus < 201103L) //std < C++11
- #define ASSERT_CONCAT_(a, b) a##b
- #define ASSERT_CONCAT(a, b) ASSERT_CONCAT_(a, b)
- #ifdef __COUNTER__
- #define static_assert(e,m) \
- ;enum { ASSERT_CONCAT(STATIC_ASSERT_, __COUNTER__) = 1/(int)(!!(e)) }
- #else
-
-
-
-
- #define static_assert(e,m) \
- ;enum { ASSERT_CONCAT(assert_line_, __LINE__) = 1/(int)(!!(e)) }
- #endif //__COUNTER__
- #endif //(__cplusplus < 201103L)
|