Quantcast
Channel: Tools
Viewing all articles
Browse latest Browse all 91752

Forum Post: RE: Why sizeof() cannot be used in #if clause?

$
0
0

Hello Chester,

Thank you. The trick is awesome.

I finally use this macro,

#define COMPILE_STATIC_ASSERT(test) typedef char assertion_on_mystruct[(!!( test ))*2-1 ]

I expect the static_assert feature can be implemented in new C2000 compiler release.


Viewing all articles
Browse latest Browse all 91752

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>