Check out this article on basic C++ template metaprogramming concepts, such as type lists and metafunctions. This post also elaborates on alias templates and their limitations,
presents different approaches to implementing four fundamental metafunctions (first<>
, front<>
, last<>
and back<>
) and introduces a common metaprogramming primitive: apply<>
.
Fundamental operations on type lists (Part1)
by Szilard Szaloki
From the article:
One of the fundamental building blocks of template metaprogramming is type lists. Dealing with them used to be a hassle, but since C++11 they are pretty much built into the language through type template parameter packs...
Add a Comment