Code for the Design Patterns in Modern C++ course from Udemy.
Design patterns are common architectural approaches. They were popularized by the Gang of Four book (1994) for Smalltalk and C++.
They are tipically split into three categories. This is called Gamma Categorization after Erich Gamma, one of the GoF authors.
- Deal with the creation of objects.
- Explicit vs. Implicit: Constructor vs. [Dependency Injection, reflection, ...].
- Wholesale vs. piecewise initialization.
- Concerned with the structure (e.g., class members).
- Many patterns are wrapers that mimic the underlying class interface.
- Stress the importance of godd API design. Make API usable for other people.
- They are all different; no central theme.
- They solve particular problems.
sudo apt install libboost-serialization-dev
sudo apt install gcc-10 g++-10 # C++20
mkdir -p build && cd build
cmake -D CMAKE_C_COMPILER=gcc-10 -D CMAKE_CXX_COMPILER=g++-10 -DCMAKE_INSTALL_PREFIX=../bin .. && make
make install