Several phrases from the book are now used within the C++ community as generic terms: modern C++ (as opposed to C/C++ style), policy-based design and typelist.
It was first popularized in C++ by Andrei Alexandrescu with Modern C++ Design and with his column Generic
Previous examples of this design approach, based on parameterized generic code, include parametric modules (functors) of the ML languages,[2] and C++ allocators for memory management policy.
The main idea is to use commonality-variability analysis to divide the type into the fixed implementation and interface, the policy-based class, and the different policies.
For example, the template method pattern can be reinterpreted for compile time, so that a main class has a skeleton algorithm, which – at customization points – calls the appropriate functions of some of the policies.
Note that the generic implementation is in Run and therefore the code is unable to be compiled unless both policies (Print and Message) are provided.
Loki is a C++ software library written by Andrei Alexandrescu as part of his book Modern C++ Design.
The library makes extensive use of C++ template metaprogramming and implements several commonly used tools: typelist, functor, singleton, smart pointer, object factory, visitor and multimethods.
[4] Maintenance and further development of Loki has been continued through an open-source community led by Peter Kümmel and Richard Sposato as a SourceForge project.
Loki is not tied to the book anymore as it already has a lot of new components (e.g. StrongPtr, Printf, and Scopeguard).