Browse Source

include double define (from merging 0.2)

Julius Pfrommer 7 years ago
parent
commit
3e745028e4
1 changed files with 0 additions and 23 deletions
  1. 0 23
      include/ua_config.h.in

+ 0 - 23
include/ua_config.h.in

@@ -307,29 +307,6 @@ extern "C" {
 # define UA_TYPENAME(name)
 #endif
 
-/**
- * Static Assert
- * ^^^^^^^^^^^^^
- * Outputs an error message at compile time if the assert fails.
- * Example usage:
- * UA_STATIC_ASSERT(sizeof(long)==7, use_another_compiler_luke)
- * See: https://stackoverflow.com/a/4815532/869402 */
-#if defined(__cplusplus) && __cplusplus >= 201103L /* C++11 or above */
-# define UA_STATIC_ASSERT(cond,msg) static_assert(cond, #msg)
-#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L /* C11 or above */
-# define UA_STATIC_ASSERT(cond,msg) _Static_assert(cond, #msg)
-#elif defined(__GNUC__) || defined(__clang__) || defined(_MSC_VER) /* GCC, Clang, MSC */
-# define UA_CTASTR2(pre,post) pre ## post
-# define UA_CTASTR(pre,post) UA_CTASTR2(pre,post)
-# define UA_STATIC_ASSERT(cond,msg)                             \
-    typedef struct {                                            \
-        int UA_CTASTR(static_assertion_failed_,msg) : !!(cond); \
-    } UA_CTASTR(static_assertion_failed_,__COUNTER__)
-#else /* Everybody else */
-# define UA_STATIC_ASSERT(cond,msg) \
-    typedef char static_assertion_##msg[(cond)?1:-1]
-#endif
-
 #ifdef __cplusplus
 } // extern "C"
 #endif