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.
When optimizing code for performance, it is often useful to have a very clear idea about what happens in memory. Reducing page faults, cache misses, TLB misses et cetera can be a major factor in speeding up your code. In this post I will demonstrate how you can inspect paging information regarding the memory of your process under Linux.
One C++17 problem I come across every now and then is to determine whether a certain class or
function template specialization exists - say, for example, whether
std::hash<SomeType> can be used. I like to have solutions for these kind of problems in a
template-toolbox, usually just a header file living somewhere in my project. In this article I try
to build solutions that are as general as possible to be part of such a toolbox.
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.