Code examples for my Core C++ 2025 talk - The effects of C++ evolvement on Design Patterns Core C++ 2025
CMake 1.16 can bu used to build the samples, or each file can be compiled individually.
The order gicen is as in the presentation with some additional patterns included.
| Name | Pattern | C++ Version | Comments |
|---|---|---|---|
| Abc.cpp | ABC | 14 | |
| Factory.cpp | Factory | 14 | |
| Singleton.cpp | Singleton | 14 | |
| TemplatedSingleton.cpp | Template Singleton | 14 | |
| Observer.cpp | Observer | 14 | Classic implementation |
| Observer-17.cpp | Observer | 17 | Callbacks implementation |
| Observer-20.cpp | Observer | 20 | Coroutines implementation |
| Builder-Classic.cpp | Builder | 14 | Classic implementation |
| Builder-fluent.cpp | Builder | 14 | Fluent Builder |
| Builder-Init-List.cpp | Builder | 14 | Initializer List Builder |
| Facade.cpp | Facade | 14 | |
| Decorator.cpp | Decorator | 14 | Classic implementation |
| Decorator-CRTP.cpp | CRTP Decorator | 14 | CRTP implementation |
| Decorator-20.cpp | Concepts Decorator | 20 | Concepts implementation |
C++14 files might be complied with C++11 as is or with backported features such as make_unique.