Andrzej's C++ Blog
257 FOLLOWERS
I am Andrzej. I started this blog because I wanted to share my knowledge on both practical aspects of programming in C++ and some theoretical background on C++ design and current evolution. I have been developing commercial applications in C++ since 2004 and have been studying the progress of the ISO C++ Standards Committee. I believe some of the posts may prove useful to C++ programmers.
Andrzej's C++ Blog
4M ago
Some common knowledge: the lifetime of the object starts when its initialization is complete. Based on this we can get some further expectations: an object becomes const only after its initialization is complete. But this lifetime property of objects becomes ..read more
Andrzej's C++ Blog
1y ago
The title may be misleading, as I had to invent a new short term for the pattern that occurs in the code once in a while. Example first: During the construction of an XML file when you write an element ..read more
Andrzej's C++ Blog
2y ago
The goal of this post is to show how the <chrono> 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 <chrono> from ..read more
Andrzej's C++ Blog
2y ago
This post has been inspired by the readers’ questions about using concepts to solve real problems. We will have a look at two such problems and see if, and how, concepts can help. Case Study 1 My concept has two ..read more
Andrzej's C++ Blog
3y ago
Last year I published two posts on writing concepts: Concept Archetypes, Semantic requirements in concepts. Having had some time to reflect upon these posts, I now realize that the model presented in them is not complete. In this post I ..read more
Andrzej's C++ Blog
3y ago
In this post we will see what a contract is, how preconditions and invariants can be derived from the contract, and how this process can help detect bugs. Two points that I will be stressing in this post are: (1 ..read more
Andrzej's C++ Blog
3y ago
The word ‘concept’ in the context of C++ generic programming has two meanings. The first is more abstract: it is the notion from the domain of Generic Programming (GP) in general. GP is not tied to any specific language: it ..read more
Andrzej's C++ Blog
3y ago
An aggregate is an array or a class with no user-declared or inherited constructors, no private or protected direct non-static data members, no virtual functions, and no virtual, private, or protected base classes. Aggregates can be initialized in aggregate initialization ..read more
Andrzej's C++ Blog
3y ago
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 failed. This deserves a closer examination. Let’s recall ..read more
Andrzej's C++ Blog
3y ago
Concepts in the form added in C++20 used to be called lite. This is because they do not provide one quite important functionality: having the compiler check if the author of a constrained template is only using operations and types ..read more