Hacker News new | past | comments | ask | show | jobs | submit login

Deferred expansion is a common (well, not that common) trick this misses that I would have included. Generally the C preprocessor is pretty terrible though, you should seriously consider generating code with an external tool before doing anything nontrivial with it.

Regardless, here's a link that seems to cover this and other somewhat more obscure techniques: https://github.com/pfultz2/Cloak/wiki/C-Preprocessor-tricks,...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: