Multi-threading in C++, “do” and “don’t”. (part 1- try lock free design)

In general multi threading can be really hard, and it is kind of milestone for many people to get know how to deal with multiple threads and not go into some really hard to debug problems. This is my short guideline how to write multi threaded programs in modern c++ ... Think about problem you … Continue reading Multi-threading in C++, “do” and “don’t”. (part 1- try lock free design)

std::format is such a nice C++20 feature :-) but … it stays not implemented by any of mainstream compilers.

C++ compiler support (access 26.03.2021) https://en.cppreference.com/w/cpp/compiler_support String formatting in c++ In 2021 formatting string in C++ (unless you are using some 3rd party library like boost::format) involves using pritnf() functions, that are inherited from C (so quite old), or use stringstream which is maybe not as efficient as we would expect specially if you want … Continue reading std::format is such a nice C++20 feature 🙂 but … it stays not implemented by any of mainstream compilers.

If you want to amaze code reviewer with your awesomeness try this one …

class NetworkServiceConfig : public Config<NetworkServiceConfig>{ ... Wait! What? ok ok ... this is not a joke. In fact this is design pattern, and it is called Curiously Recurring Template Pattern CTPR. 🙂 So why anyone would like to do that? Why to derive from a template that takes a Derived class as a template parameter … Continue reading If you want to amaze code reviewer with your awesomeness try this one …