Part     4

Generic Programming

Although the STL provides a ready-made library of templates to cover many requirements, there is no escaping the fact that you will eventually need to use the ability to create your own templates.

The C++ template compiler is a complex, underused, and exceptionally useful piece of software. As well as letting you abstract types out of your classes to create generic and reusable code, the template compiler can also let you calculate constant values at compile time. This type of template programming is known as template metaprogramming.

This part of the book introduces you to the features C++ provides to create your own templates. It also shows you how to use some built-in template metaprograms and even ends with ...

Get Learn C++ for Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.