mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-11-27 17:36:58 +08:00
* refactor: clean to roadmap content * refactor: move shared helpers into scripts/lib
886 B
886 B
CRTP
The Curiously Recurring Template Pattern (CRTP) is a C++ idiom where a class template inherits from its own specialization. This technique achieves static polymorphism, offering an alternative to runtime polymorphism using virtual functions. CRTP allows customization of base class behavior without virtual function call overhead, enabling compile-time polymorphism for improved performance. It's useful when you need to extend or modify functionality in derived classes while maintaining efficiency by avoiding the runtime cost associated with virtual functions.
Visit the following resources to learn more: