Templates and generic programming
T.49
Where possible, avoid type-erasure
Reason
Type erasure incurs an extra level of indirection by hiding type information behind a separate compilation boundary.
Example
???
Exceptions: Type erasure is sometimes appropriate, such as for std::function.
Enforcement
???
Note
T.def: Template definitions
A template definition (class or function) can contain arbitrary code, so only a comprehensive review of C++ programming techniques would cover this topic. However, this section focuses on what is specific to template implementation. In particular, it focuses on a template definition's dependence on its context.