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.
Month: March 2021
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 …
How Modern CMake ease way you mock in C++
Mocking again, as a "response" to my post about how easy mocking in python. So this is my recommendation, of how to perform mocking in C++, reduce impact of testing code to a production code, and keep clean interfaces (everything in contradiction to dependency injection).
So what is this “Modern CMake” exactly?
Building C and C++ projects can be really non trivial stuff, and people are struggling with this topic for years. I found CMake very useful, explicit, easy to use "project builder" . But what is a "Modern CMake" ? Lets dig into this topic ... It is a routine not a feature. A s usual … Continue reading So what is this “Modern CMake” exactly?
