Author Archives: Andrzej Krzemieński

(Not) using namespace std;

This is called a using directive. Using it in code that is supposed to work for years is not a good idea. Sometimes programmers are given advice to just type using namespace std; and all things from the Standard Library … Continue reading

Posted in programming | Tagged | 7 Comments

Deducing your intentions

The language feature in C++17 known as class template argument deduction was intended to supersede factory functions like make_pair, make_tuple, make_optional, as described in p0091r2. This goal has not been fully achieved and we may still need to stick to … Continue reading

Posted in programming | Tagged , , | 12 Comments

Treating symptoms instead of the cause

Compiler warnings can sometimes help us find bugs before we even build our program, but it only works provided that we can make use of the warnings. Especially, when we are aware that warnings detect only symptoms of the bugs … Continue reading

Posted in programming | Tagged , , | 7 Comments

Faces of undefined behavior

I have been busy recently (doing C++-related stuff) and cannot find a spare time for preparing a decent blog post. I expect that to change in November. For the interim I am posting here my last year’s talk at code::dive: … Continue reading

Posted in programming | Tagged , , , , , | 1 Comment

Functions in std

Names of functions from the Standard Library used as pointers/references to functions can cause breakage in your code if you are upgrading to the newer version of C++ or compiling using a different implementation of the Standard Library, or even … Continue reading

Posted in programming | Tagged , | 9 Comments

Rvalues redefined

In this post we will explore what I consider the most significant language change in C++17. I call it the most significant because it changes the way you design your resource-managing types and how you think about initialization. It is … Continue reading

Posted in programming | Tagged , | 28 Comments

Testing C++ online

In this short post I wanted to share links to three online services that I use for testing different aspects of C++ and C++ compilers. https://wandbox.org/ — this allows you to compile and observe the output of programs compiled in … Continue reading

Posted in programming | 3 Comments