Refreshing C++

For various reasons, I started to play again with C++.
Although I have been using it extensively, my last time using it was maybe in 2016, and I definitely need a refresher now.

This goes actually on multiple directions:

  • A general refresh on using it: not only getting used to the syntax, but for instance, get to speed with the new trends in unit test frameworks.
  • Learn how to use CMake, because I have almost exclusively used Visual Studio, where I did not have to think about makefiles, but that’s no longer available with VSCode and its C++ extension.
  • Learn a bit about the changes. I was left at C++11, but never got too much into move semantics. Now we have C++14 (which is essentially a better C++11), then C++17 (with ranges and views, which look awesome) and finally C++20
  • Find new blogs to follow. So far:

Overall, C++ is a strange beast. From one side, there is a lot of hidden and additional complication because of its legacy, but from the other, it’s been improving and changing so much over its history that I am impressed.

That said, since I wanted mostly to refresh a bit my C++, I will limit myself to C++14, or the so-called “modern C++”.

By the way, a small rant about “modern C++”.
Unfortunately, most resources for modern C++ seem to focus only on performance, and move semantics. Which is correct, but in my personal opinion they miss a bit the point: for a “normal” programmer, the main difference in modern C++ is the usage of algorithms.
Yes, the ability to speed up critical code execution is nice, and I am pretty sure there are quite a lot of use cases for C++ to exactly need that; however, for most of the normal cases, the biggest improvement comes from a better standard library and especially, from a “functional” style that can emerge once using algorithms.