3 ms·
D's ImportC also can do CTFE with C code! int sum(int a, int b) { return a + b; } _Static_assert(sum(3, 4) == 7, "look ma, check at compile time!");
by WalterBright 2y ago
D's ImportC also can do CTFE with C code!
int sum(int a, int b) { return a + b; }
_Static_assert(sum(3, 4) == 7, "look ma, check at compile time!");
Why doesn't the C Standard add this? It works great!