42 #ifndef INC_epicsAssert_H
43 #define INC_epicsAssert_H
45 #include "libComAPI.h"
53 #ifndef epicsAssertAuthor
55 # define epicsAssertAuthor 0
61 # define assert(ignore) ((void) 0)
65 LIBCOM_API
void epicsAssert (
const char *pFile,
const unsigned line,
66 const char *pExp,
const char *pAuthorName);
71 # define assert(exp) ((exp) ? (void)0 : \
72 epicsAssert(__FILE__, __LINE__, #exp, epicsAssertAuthor))
78 #if __cplusplus>=201103L
79 #define STATIC_ASSERT(expr) static_assert(expr, #expr)
82 #define STATIC_JOIN(x, y, z, w) STATIC_JOIN4(x, y, z, w)
83 #define STATIC_JOIN4(x, y, z, w) x ## y ## z ## w
87 # define STATIC_ASSERT_MSG(l) STATIC_JOIN(static_assert_, __COUNTER__, _failed_at_line_, l)
89 # define STATIC_ASSERT_MSG(l) STATIC_JOIN(static_assert_, 0, _failed_at_line_, l)
95 #define STATIC_ASSERT(expr) \
96 typedef int STATIC_ASSERT_MSG(__LINE__) \
97 [ (expr) ? 1 : -1 ] EPICS_UNUSED
Compiler specific declarations.