mirror of https://github.com/ecmwf/eccodes.git
Macros: No need for COMPILE_TIME_ASSERT; just use the C++ static_assert
This commit is contained in:
parent
b85b85348b
commit
9cde3aaef7
|
@ -171,20 +171,6 @@ extern int pthread_mutexattr_settype(pthread_mutexattr_t* attr, int type);
|
|||
if (!(a)) codes_assertion_failed(#a, __FILE__, __LINE__); \
|
||||
} while (0)
|
||||
|
||||
#ifdef __gnu_hurd__
|
||||
#define COMPILE_TIME_ASSERT(condition) \
|
||||
extern int compile_time_assert[!!(condition)-1]
|
||||
#else
|
||||
/* Compile time assertion - Thanks to Ralf Holly */
|
||||
#define COMPILE_TIME_ASSERT(condition) \
|
||||
do { \
|
||||
enum \
|
||||
{ \
|
||||
assert_static__ = 1 / (condition) \
|
||||
}; \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
#define DEBUG_ASSERT(a) Assert(a)
|
||||
#define DEBUG_ASSERT_ACCESS(array, index, size) \
|
||||
|
|
Loading…
Reference in New Issue