-
C++ Language Features Related to C++ TMP
- static_assert: C++11
- sizeof
- decltype: C++11
- template
- type template parameter
- non-type template parameter
- full specialization
- partial specialization
- template template parameter
- variadic template: C++11
- using type alias, using type alias template: C++11
- variable template: C++14
- constexpr: C++11
- constexpr if: C++17
- user-defined literals: C++11
- fold expression: C++17
- structured binding: C++17
-
C++ Library Features Related to C++ TMP
- type_traits: C++11
- std::integral_constant
- std::decay
- std::enable_if
- std::conditional
- std::void_t: C++17
- etc.
- std::declval: C++11
- std::integer_sequence: C++14
- std::initializer_list: C++11
- std::tuple: C++11
- std::variant: C++17
- std::optional: C++17
- type_traits: C++11
- Meta-function
- numeric calculation
- type calculation
- Meta-function Forwarding
- Meta-function Class
- SFINAE(Substitution Failure Is Not An Error)
- Overload Resolution Management
- Integer Sequence Manipulation
- identity
- type_is
- type_list, TL
- length
- head
- tail
- last
- init
- map
- filter
- foldl, foldr
- compose
- bind_first, bind_last
- reverse
- find
- unique
- ...
Codes and examples of these metafunctions are available at https://github.com/ghjang/skull.
- Member Test
- Integer Sequence Generation
- make_variant_array function template
- Implementing tuple
- Implementing Generic Abstract Factory
- Aligned Tuple
- tuple_cat
- ...
- What Does Haskell Have to Do with C++?: Bartosz Milewski's blog post
- Tiny Metaprogramming Library: Eric Niebler's blog post
- Simple C++11 metaprogramming: Peter Dimov's blog post
- Practical C++ Metaprogramming: 54-page PDF file report about C++ TMP
- CppCon 2015: Louis Dionne “C++ Metaprogramming: A Paradigm Shift"
- C++ Now 2016: Louis Dionne: Metaprogramming for dummies
- C++ Now 2016: Louis Dionne: Metaprogramming for the brave
- Books
- C++ Template Metaprogramming Libraries