4 ms·
It's not particularly difficult to deal with, as far as C++ goes (I'd take it over most template shenanigans, the rules are a little simpler). It would be easie
by rcxdude 2y ago
It's not particularly difficult to deal with, as far as C++ goes (I'd take it over most template shenanigans, the rules are a little simpler). It would be easier if C++ had ever tried to improve the preprocessor instead of just saying "don't use it" and trying to get templates to do a subset of the same kind of things you might want the preprocessor for.
(Also, there's a much better version of this I decribed above: mucking about with re-including the same file multiple times is unnecessary and constraints things too much. You can make a much nicer interface for users of the macro with only a little extra effort)