In fact, CodeChecker is much more than just a front-end to Clang’s Static Analyzer (
here on…) - but using it just to drive
clangsa is already awesome enough that I think you should
use it to hunt for bugs in your C++ projects.
std::vector has the interesting property of allowing to be used with incomplete types to a small
degree. However, many legacy (and not-so-legacy) code bases use it in ways which are not allowed
by the standard, and which do start breaking with C++20. In this article I’ll explain the
limitations, a mistake I’ve seen several times now and why this starts breaking now.
I recently needed to trace some error related to C++17 class template argument deduction and came across some corner cases. In this article, I document what I learned, show some “paradox” cases (which have nice, clean solutions as per the standard) and demonstrate a suspected Clang bug.