BoostCon 2012

C++ Metaprogramming

An intensive hands-on course exploring the concepts, tools, and techniques of metaprogramming in C++ with the field’s leading practitioners.

  • learn what metaprogramming is and why it is used.
  • build expressive, declarative library interfaces that generate arbitrarily sophisticated executable code such as parsers and matrix multipliers.
  • gain first-hand experience with compile-time computation
  • learn about Boost libraries that make metaprogramming expressive, fun, and (yes!) easy.

Prerequisites

At least two years C++ experience. Familiarity with the STL and relative comfort writing and using templates. This is a challenging course, most appropriate for advanced C++ programmers.

Format

Five days of lecures and hands-on exercises.

Book

C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond by our principal instructor, Dave Abrahams, and Aleksey Gurtovoy.

Topics

  • What is Metaprogramming
  • How Template Metaprogramming Works
  • The Mechanics of Template Instantiation
  • Traits and Type Manipulation
  • Metafunctions
  • Polymorphism and Non-Type Data
  • Type sequences
  • The Boost Metaprogramming Library
  • Compile-Time Iterators
  • Compile-Time Algorithms
  • Domain-Specific Embedded Languages
  • Code Generation with Templates
  • Techniques for Meshing Compile-Time and Runtime Computation
  • Tuple Metaprogramming with Boost.Fusion
  • Preprocessor Metaprogramming with Boost.Preprocessor
  • Expression Templates
  • The Boost.Proto Expression Template Meta-library
  • Understanding Template Errors
  • Intentionally Generating Compile-Time Errors
  • Compile-Time Performance
  • Using Overload Resolution To Improve Metaprogram Speed


Note

Details and duration of this course can be adjusted to accomodate your schedule, interests, and specific development challenges.

News

  • The Future of C++

    Dave Abrahams has been thinking about what’s next for the C++ language in a series of articles at the C++Next blog.

    More...

  • Programmer’s Grimoire Interview: now in English

    Thanks to Takatoshi Kondo and colleagues, non-Japanese readers can now view this excerpt from Volume 2, “The Evolution of Languages” - Programmer’s Grimoire Interview with Dave Abrahams  

    More...

  • The latest issue of Programmer’s Grimoire features an interview with Dave Abrahams

    Vol.2 of the Japanese-language journal Programmer’s Grimoire, is subtitled “The Evolution of Languages.” If you don’t read Japanese, fear not, an English translation is coming soon.

    More...