add a static assert macro

Have to find some sort equivalent for msvc later...
reverse bitfields, now gives correct results

Unfortunately it seems that this could mess up
on all kinds of difference combinations and possibly
even in different compiler iterations... we might
have to switch to bitshifting macros, ugh.