3 ms·
I can't find my favorite C macro bomb, but this same post has a C answer using defines: https://codegolf.stackexchange.com/a/69413/4270 https://codegolf.stackex
by azhenley 6y ago
I can't find my favorite C macro bomb, but this same post has a C answer using defines: https://codegolf.stackexchange.com/a/69413/4270 https://codegolf.stackexchange.com/a/69413/4270
The C++ template answers are particularly scary...
- mey 6y agoTemplate meta-programming is essentially its own language
- StillBored 6y agog++ has gotten a lot better in the ~10 years since I wrote a bignum library with nested template parameters. Back when I initially did it, gcc would literally try and expand everything, resulting in insane compile times (and out of memory issues/crashes). If it did manage to compile it, the resulting exe's were also massive. At some point (to lazy to look up the flag) gcc added a template recursion parameter that stops trying to unroll everything at some sane depth. Now the code compiles quickly the .exes are reasonably sized/etc.