CRTP (Curiously Recurring Template Pattern)
CRTP is a template pattern where a class Derived inherits from a template base class Base, passing itself as a template argument. This enables compile-time polymorphism without virtual functions.
CRTP is a template pattern where a class Derived inherits from a template base class Base, passing itself as a template argument. This enables compile-time polymorphism without virtual functions.
Pimpl (Pointer to Implementation) separates a class's interface from its implementation by moving private members into a separate implementation class. This reduces compilation dependencies and provides better encapsulation.
Policy-based design decomposes complex behaviors into independent policy classes combined through templates. Each policy defines one aspect of behavior, and policies are mixed together to create flexible, reusable components.
Type erasure hides the concrete type behind a common interface, allowing different types to be treated uniformly without inheritance. Combines the flexibility of runtime polymorphism with the performance benefits of templates.