C++ Template Metaprogramming

Last year I held a short presentation featuring an introduction to C++ Template Metaprogramming in realraum. I just added a few comments to the slides and code examples, as I promised to put them online.

The documents provide an overview what meta-programming means, how it is done in C++ using templates, and what kind of programming language C++ templates constitute. Then it continues with an introduction into conditionals and recursion, and finally provides a code example how to use simple template techniques to create a restricted<> type, which will produce a compile-time error if a given operation cannot possibly result in any acceptable value.

At first I wanted to go into much deeper territory, but I both lack the experience with that kind of stuff, and at the time also did not have that much time for preparation. Still, feel free to comment on whatever you deem worth to comment on.