by gpderetta · 6y ago · 0 comments
Only early extremely non conforming compilers had macro-like template expansion.
Edit: although calling templates type level macros wouldn't be completely wrong.
Edit2: a better definition is that templates are type level functions: they take compile time values, types and other type functions and return values, types and type level functions.
The Template Haskell paper has some interesting things to say on the nature of C++ templates:
https://www.microsoft.com/en-us/research/wp-content/uploads/...