The compile-time tag has no wiki summary.
12
votes
8answers
866 views
Crash your favorite compiler
Write a perfectly legal code in a decent language of your choice whose compiling will either crash the compiler or send it into an infinite loop (infinite compile time).
Restrictions:
Use a ...
12
votes
7answers
2k views
Compute the CRC32 table at compile-time
The reference implementation of CRC32 computes a lookup table at runtime:
/* Table of CRCs of all 8-bit messages. */
unsigned long crc_table[256];
/* Flag: has the table been computed? Initially ...
22
votes
3answers
2k views
Solve the eight queens problem at compile-time
Can you solve the eight queens puzzle at compile-time?
Pick any suitable output format.
I'm particularly interested in a C++ template metaprogramming solution, but you can use languages that have ...