The unexpected behaviour of the ternary operator (?:)

The in-place if operator (officially known as the ternary operator) has some behaviour that you might not expect. In fact, the compiler may do a lot of things you don’t expect! Let’s go on the magical journey of the tenary operator and the differences between GCC, Clang and Visual Studio.

Read more...

Using Visual Studio Build tools in Docker on Windows Server 2016

The title of this article might seem oddly specific, but this turned out to be less straightforward than I thought it would (or should) be. I run my Jenkins builds for Visual Studio on a VPS running Windows 2016 server. In the past I was hit by a bug where the Visual Studio build tools installer would crash resulting in a corrupted .NET installation inside of the container. More recently a Windows 2016 security update stirred things up even more.

Read more...