Skip to content
michael.caisse.io michael.caisse.io
c++ library

Boostache Exposed: the internals of Boost's template engine

Conntinuing to explore how modern C++ features and idioms can be applied effectively in resource-constrained embedded environments.

M

Michael Caisse

60 minutes

Event: cppcon

Abstract

Template engines are commonly found generating web pages, customer reports, or even source code. They take a source template and data model as input and generate some desired output.

Boostache was started as the Library in a Week challenge from CppNow’14 with initial support for Mustache.

Today Boostache supports multiple template formats and adapts automagically at compile time to user defined data models. Many of the techniques utilized in Boostache are the same that Ciere has employed in custom IDL compilers, Domain Specific Language systems, compilers, and runtimes.

This talk will briefly introduce Boostache and then delve into the internal architecture and design of the library. We will explore some implementation details of the parser, compiler, virtual machine, and generic data model infrastructure with the goal to expose useful techniques and patterns from this C++11 code base that can be used in your own libraries and applications.

Play the video