4 ms·
Note that C11 has a more friendly static assertion feature: _Static_assert(condition, "error message if condition evaluates to false"); (You can also use
by comex 10y ago
Note that C11 has a more friendly static assertion feature:
_Static_assert(condition, "error message if condition evaluates to false");
(You can also use "static_assert" as an alias for the ugly keyword after including <assert.h>.)
- 0xFFC 10y agoI wander what kernel developers thinking about migrating toward C11.
- CapacitorSet 10y agoI think there's a better chance for a static_assert proposal in C, especially since Torvalds isn't particularly fond of C++. Edit: whoops, apparently static_assert is in C11 as well as in C++11. Ignore this comment.
- zodiac 10y agoC11 isn't C++