June 2021

Quick Q: Overload resolution between object, rvalue reference, const reference

Quick A: the better match is picked, and an error generated if there none.

Recently on SO:

Overload resolution between object, rvalue reference, const reference

As there is only one parameter, the rule is that one of the three viable parameter initializations of that parameter must be a better match than both the other two. When two initializations are compared, either one is better than the other, or neither is better (they are indistinguishable).

Without special rules about direct reference binding, all three initializations mentioned would be indistinguishable (in all three comparisons)...

GotW #102 Solution: Assertions and "UB" -- Herb Sutter

Solution just posted:

GotW #102 Solution: Assertions and "UB"

by Herb Sutter

From the article:

Now that we have considered assertions, postconditions, and preconditions in GotWs #97-101, let’s pause and reflect: To what extent does a failed contract imply "UB"... either the Hidden Dragon of Undefined Behavior, or the Crouching Tiger of Unspecified Behavior?

PVS-Studio Team: Switching to Clang Improved PVS-Studio C++ Analyzer's Performance

Although the project's preparation took a while, we were satisfied that the analyzer's performance grew by over 10%. We will use Clang to build future releases of PVS-Studio for Windows.

PVS-Studio Team: Switching to Clang Improved PVS-Studio C++ Analyzer's Performance

by Alexey Govorov and Sergey Larin

From the article:

From the earliest days, we used MSVC to compile the PVS-Studio C++ analyzer for Windows - then, in 2006, known as Viva64, version 1.00. With new releases, the analyzer's C++ core learned to work on Linux and macOS, and we modified the project's structure to support CMake. However, we kept using the MSVC compiler to build the analyzer's version for Windows. Then, in 2019, on April 29th, Visual Studio developers announced they had included the LLVM utilities and Clang compiler in the IDE.