Browse Source

add compiletimeassert.h

master
Felix von Leitner 8 years ago
parent
commit
830241e86d
2 changed files with 7 additions and 0 deletions
  1. +3
    -0
      CHANGES
  2. +4
    -0
      compiletimeassert.h

+ 3
- 0
CHANGES View File

@ -1,3 +1,6 @@
0.30:
add compiletimeassert.h
0.29:
save 8 bytes in taia.h for 64-bit systems
add buffer_tosa (buffer writing to auto-growing stralloc)


+ 4
- 0
compiletimeassert.h View File

@ -0,0 +1,4 @@
#define __X(x, y) x ## y
#define __Y(x, y) __X(x, y)
#define compiletimeassert(cond) struct __Y(foo,__LINE__) { char __temp[1 - (!(cond))*2]; };

Loading…
Cancel
Save