Blog

The surprising codegen impact of noexcept

Would spamming the noexcept keyword make your code faster? Sometimes. But not always. Consider the following snippet of code: I intentionally do not define g in this translation unit since…

Const Correctness Issue of std::function

The const type qualifier is one of the jewels of the C++ language design. Surrounding by this feature, we devise the " const correctness" practice to prevent const objects from getting mutated…

We are defining assignment operators wrong.

Update: Apparently there is a WG21 paper on this subject that goes in much more detailed than my post. I am surprised that I missed his CppCon talk on this topic and come into the silimar conclusion…