Pure compile-time functions and classes in the CPH MPL
Author:Jyrki Katajainen
Publication:CPH STL report 2017-2, Department of Computer Science, University of Copenhagen (2017), 54 pp.
Full text:<pdf.gif>PDF (579 kB)  
Abstract:In this paper, we document the facilities available at the CPH MPL, Copenhagen metaprogramming library written in C++. When designing this library, we had three adjectives in mind: small, neat, and tidy. In C++, metaprogramming is a subject where functional programming and imperative programming meet. The values and types created at compile time are immutable in nature, so traditionally the compile-time entities have been processed using techniques known from functional programming. The variadic templates and constant expressions added to C++ have moved metaprogramming closer to the imperative world. Now, it is not necessary to use heavy template-metaprogramming recursion, when a simple loop will do. All this has made the implementation of a metaprogramming library easier. The main goal of this paper is pedagogical: By reading this paper today, you can use metaprogramming in your programs tomorrow. You have to give a few extra options to your compiler and the tools are at your fingertips. But you should not be surprised if you get an error message like "internal compiler error".
Related:<html.gif>HTML (Later version)  <zip.png>ZIP (Release 1)  <zip.png>ZIP (Release 2)  
  author = {Jyrki Katajainen},
  title = {Pure compile-time functions and classes in the CPH MPL},
  type = {CPH STL report},
  number = {2017-2},
  institution = {Department of Computer Science, University of Copenhagen},
  year = {2017},
  pagetotal = {54},
This page was generated by Jyrki Katajainen <jyrki@di.ku.dk> on 2020-04-27.