Tag: CRTP
3 posts
-
Design Patterns in Modern C++: What Singleton, Factory, Observer, Strategy and Visitor Look Like After C++17
How GoF patterns change in modern C++: Meyers singleton and its test traps, factory registries, observer re-entrancy, visitor as std::variant, CRTP.
-
C++ Class Templates: Out-of-Line Members, Partial Specialization, Alias Templates and CTAD
C++ class templates: Stack vector<int> vs duplicate IntStack classes, partial specialization, template aliases with using, CTAD, and production.
-
CRTP vs Virtual Functions: Static Polymorphism Without vtable Overhead
How CRTP gives C++ static polymorphism without a vtable, how it compares with virtual functions, the usual CRTP mistakes, and C++23 deducing this.