Using Std:Chrono

The goal of this post is to show how the library can be used to solve a practical but not that obvious problem. There is a lot of good material in the Internet where one can learn &l… | Continue reading


@akrzemi1.wordpress.com | 2 years ago

Concept Archetypes

An observant reader indicated that in the previous post where I was trying to implement a concept archetype — a type with minimal interface that models a given concept — I actually fail… | Continue reading


@akrzemi1.wordpress.com | 4 years ago

Requires-Expression

This post is about a C++20 feature, so we will be talking about the future. However, this is a very near feature, C++20 is expected to go out this year, and concepts look really stable, so the chan… | Continue reading


@akrzemi1.wordpress.com | 4 years ago

Short-Circuiting in Meta-Functions

Short-circuiting in logical operations is a very useful and an often used feature: Should cond_a() evaluate to false, cond_b() is guaranteed not to be evaluated. This is useful for two reasons. One… | Continue reading


@akrzemi1.wordpress.com | 4 years ago

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… | Continue reading


@akrzemi1.wordpress.com | 5 years ago

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… | Continue reading


@akrzemi1.wordpress.com | 5 years ago

(Not) using std:thread (2012)

This post is about std::thread but not about threads or multi-threading. This is not an introduction to C++ threads. I assume that you are already familiar with Standard Library components thread a… | Continue reading


@akrzemi1.wordpress.com | 5 years ago

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 dete… | Continue reading


@akrzemi1.wordpress.com | 5 years ago

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. — this allows you to compile and observe the output of p… | Continue reading


@akrzemi1.wordpress.com | 6 years ago