Category Archives: programming

as the name implies…

Operation cancelling and std::fstream

In the previous post we have sketched out the view that error handling is about expressing the success dependency between operations. I have also indicated the guideline “destructors only for releasing resources”. In this post we are going to see … Continue reading

Posted in programming | Tagged , , , | 11 Comments

Handling errors is canceling operations

I actually covered this topic before, in this post, but given my recent experience I feel it needs reiterating and a bit of restructuring. It boils down to the observation that any error handling I have encountered — be it … Continue reading

Posted in programming | Tagged , , , | 5 Comments

(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 | 8 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 , , | 8 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