Tag Archives: c++14
Let’s start with the problem. I want to check whether a program received a text message that consists of four consecutive zeroes. Not ‘0’, but the numeric zero. I will create a constant std::string representing the special sequence and compare … Continue reading
We will start with a bug, taken from real life. It spans across three files: Question: what happens when this program is executed?
Assertions (like C-style macro assert) are not an ideal, but still useful tool for indicating assumptions about program correctness, and help finding programmer bugs. In this post we will see how we can use assertions in constexpr functions. This works … Continue reading
In this post I want to describe a small language feature added in C++11 that, although essential for full value semantics support, is often neglected in tutorials and in compiler implementations.