Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

17 lines
340 B

  1. #if __STDC_VERSION__ >= 201710L
  2. #define compiletimeassert(cond) _Static_assert(cond)
  3. #elif __STDC_VERSION__ >= 201112L
  4. #define compiletimeassert(cond) _Static_assert(cond,"")
  5. #else
  6. #define __X(x, y) x ## y
  7. #define __Y(x, y) __X(x, y)
  8. #define compiletimeassert(cond) struct __Y(foo,__LINE__) { char __temp[1 - (!(cond))*2]; };
  9. #endif