28. Metaprogramming
Trips to fairly unknown regions should be made twice; once to make mistakes and once to correct them.
– John Steinbeck
Type Aliases; Type Predicates; Selecting a Function; Traits
Selection; Iteration and Recursion; When to Use Metaprogramming
• Conditional Definition: Enable_if
Use of Enable_if; Implementing Enable_if; Enable_if and Concepts; More Enable_if Examples
A Simple Output Function; Element Access; make_tuple
A Type-Safe printf(); Technical Details; Forwarding; The Standard-Library tuple
Units; Quantitys; Unit Literals; Utility Functions
• Advice
28.1. Introduction
Programming that manipulates ...
Get The C++ Programming Language, 4th Edition 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.