3. Typelists
Typelists are a C++ tool for manipulating collections of types. They offer for types all the fundamental operations that lists of values support.
Some design patterns specify and manipulate collections of types, either related by inheritance or not. Notable examples are Abstract Factory and Visitor (Gamma et al. 1995). If you use traditional coding techniques, you can only manipulate collections of types by sheer repetition. This repetition leads to a subtle form of code bloating. Most people don’t think it could get any better than that. However, typelists let you automate tasks that you usually confine to your editor’s macro capability. Typelists bring power from another planet to C++, enabling it to support new, interesting idioms. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access