C++ implementation of the most popular patterns