3 ms·
Oh but this is only the beginning. With boost MPL, you can do full metaprogramming at preprocessing time (I'm not 100% sure but I think the C++ preprocessor is
by roel_v 8y ago
Oh but this is only the beginning. With boost MPL, you can do full metaprogramming at preprocessing time (I'm not 100% sure but I think the C++ preprocessor is compatible with that of C? So that would make MPL applicable to C code as well.). You can generate code by iterating over lists of preprocessor 'variables' and do other crazy things that seem impossible the first few times you think about it. It's great, albeit a little bit confusing the next time you come back to it, because it makes you think more about what level you're metaprogramming at.
- jjtheblunt 8y agoThe C preprocessor wouldn't balk at "char template;" but that of C++ ?
- gpderetta 8y agoI think you mean the Boost Preprocessor Library. MPL is template based and quite a bit dated by today's standards. C++ Preprocessor is pretty much the same as C (they might go formally out of sync from o e standard release to another but in practice compilers implement the same features as far as I know).