T4 Templates - suitable for generating C++ code?
问题 Are there any issues which might make MS's T4 Template code-generation system unsuitable for generating C++ code? 回答1: It can generate any text you want, including C++ code. 回答2: A bit lengthy answer yet I think some might find it interesting I would say T4 is excellent to generate C++ with Some might retort that C++ already has tools to do MetaProgramming with like: The Preprocessor Using the preprocessor and higher-order macros you can achieve somewhat what you can do with T4, but I say