Template Metaprogramming
(Redirected from Template metaprogramming)
Jump to navigation
Jump to search
A Template Metaprogramming is a Metaprogramming that ...
- See: Macro (Computer Science)#Syntactic Macros, Metaprogramming, Generic Programming, Compiler, Source Code, Compile Time, Constant (Programming), Data Structure, Function (Computer Science), Compile-Time Function Execution, C++, Curl Programming Language.
References
2021
- (Wikipedia, 2021) ⇒ https://en.wikipedia.org/wiki/Template_metaprogramming Retrieved:2021-11-8.
- Template metaprogramming (TMP) is a metaprogramming technique in which templates are used by a compiler to generate temporary source code, which is merged by the compiler with the rest of the source code and then compiled. The output of these templates can include compile-time constants, data structures, and complete functions. The use of templates can be thought of as compile-time polymorphism. The technique is used by a number of languages, the best-known being C++, but also Curl, D, Nim, and XL.
Template metaprogramming was, in a sense, discovered accidentally. [1]
Some other languages support similar, if not more powerful, compile-time facilities (such as Lisp macros), but those are outside the scope of this article.
- Template metaprogramming (TMP) is a metaprogramming technique in which templates are used by a compiler to generate temporary source code, which is merged by the compiler with the rest of the source code and then compiled. The output of these templates can include compile-time constants, data structures, and complete functions. The use of templates can be thought of as compile-time polymorphism. The technique is used by a number of languages, the best-known being C++, but also Curl, D, Nim, and XL.
- ↑ See History of TMP on Wikibooks