Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Build Status


This library is part of the Kvasir project. Kvasir is a collection of zero cost statically checked libraries for resource constrained systems including microcontrollers. More information at


This repository contains the template metaprogramming library used in Kvasir. Although this started as an experiement in TMP optimization (with quite satisfactory results) and we did not aim for mainstream use from the beginning this library is currently evolving to meet the needs of a broader audience. This library is intended for anyone developing C++ libraries which have a metaprogramming component and do not need the fusion style heterogenious support offered by boost.hana.

A short list of key design decisions:

  • compile time speed is paramount
  • continuation style public interface
  • zero cost composition of algorithms and lambdas
  • seamless integration of 'continuations as lambda' syntax

code guidelines

To keep the library performant, clean and easy to use, several guidelines have to be taken into consideration.

  • All kvasir mpl code will go into the kvasir::mpl namespace.
  • All user-facing functions must be continuations except the explicit chain termination 'identity'.
  • Anything that is not eager should have '_impl' or similar appended, and be in the ::detail namespace

learning resources

Throughout the design process @odinthenerd has kept a pretty thorough blog explaining the optimization techniques and design decisions that went into kvasir::mpl. Keep in mind that each blog piece was a snapshot in time and a few things were deprecated or changed along the way. This library was also presented at C++Now2017 which can be found here.


We'd like to thank the following contributors, in alphabetical order:


This library is maintained by Chiel Douwes (@chieltbest). Requests for push rights could be addressed to him. The maintainer is also the only one who could approve pull requests to master.


Meta programming library designed for compilation speed.




No releases published


No packages published