CLEAN: A language for functional graph rewriting
Proc. of a conference on Functional programming languages and computer architecture
Algorithm-oriented generic libraries
Software—Practice & Experience
Generative programming: methods, tools, and applications
Generative programming: methods, tools, and applications
ICFP '00 Proceedings of the fifth ACM SIGPLAN international conference on Functional programming
Flow diagrams, turing machines and languages with only two formation rules
Communications of the ACM
Modern C++ design: generic programming and design patterns applied
Modern C++ design: generic programming and design patterns applied
The C++ Programming Language
C++ Templates
A comparative study of language support for generic programming
OOPSLA '03 Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications
An extension to the subtype relationship in C++ implemented with template metaprogramming
Proceedings of the 2nd international conference on Generative programming and component engineering
Adding wildcards to the Java programming language
Proceedings of the 2004 ACM symposium on Applied computing
C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond (C++ in Depth Series)
Beyond the C++ Standard Library
Beyond the C++ Standard Library
Essential language support for generic programming
Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation
A language for generic programming
A language for generic programming
Concepts: linguistic support for generic programming in C++
Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
Debugging C++ template metaprograms
Proceedings of the 5th international conference on Generative programming and component engineering
A Supercompiler for Core Haskell
Implementation and Application of Functional Languages
An Introduction to the Lambda Calculus
Central European Functional Programming School
Implementation of a Finite State Machine with Active Libraries in C++
Generative and Transformational Techniques in Software Engineering II
Generalized type-based disambiguation of meta programs with concrete object syntax
GPCE'05 Proceedings of the 4th international conference on Generative Programming and Component Engineering
Hi-index | 0.00 |
Template metaprogramming is an emerging new direction of generative programming. With the clever definitions of templates we can force the C++ compiler to execute algorithms at compilation time. Among the application areas of template metaprograms are the expression templates, static interface checking, code optimization with adaption, language embedding and active libraries. However, as template metaprogramming was not an original design goal, the C++ language is not capable of elegant expression of metaprograms. The complicated syntax leads to the creation of code that is hard to write, understand and maintain. Although template metaprogramming has a strong relationship with functional programming, this is not reflected in the language syntax and existing libraries. In this paper we give a short and incomplete introduction to C++ templates and the basics of template metaprogramming. We will enlight the role of template metaprograms, and some important and widely used idioms. We give an overview of the possible application areas as well as debugging and profiling techniques. We suggest a pure functional style programming interface for C++ template metaprograms in the form of embedded Haskell code which is transformed to standard compliant C++ source.