4 ms·
Wouldn't a decent compromise be to extend the capabilities of the C preprocessor, so that we could iterate over types at preprocessing time? That way, we could
by MITSardine 11mo ago
Wouldn't a decent compromise be to extend the capabilities of the C preprocessor, so that we could iterate over types at preprocessing time?
That way, we could instantiate for a great number of types more easily, while keeping implementations in source files. You can always do an instantiation macro, but it still becomes painful when the number of template arguments (and their possible values) increases.
I know there's the Boost PP library but I personally find it incomprehensible once you try to nest two+ loops.
Surely there's a reason the CPP hasn't budged?