GeistHaus
log in · sign up

https://akrzemi1.wordpress.com/feed

rss
10 posts
Polling state
Status active
Last polled May 19, 2026 04:45 UTC
Next poll May 20, 2026 03:39 UTC
Poll interval 86400s
Last-Modified Sun, 04 Jan 2026 20:47:35 GMT

Posts

Structured iteration
programmingcorrectnessidiomsrangesstating intentions
It is relatively easy to get your for-loops wrong. Luckily, C++ offers more and more bug-proof alternatives. The post is available at the new blog location: https://thecppway.com/posts/structured_iteration/.
akrzemi1
http://akrzemi1.wordpress.com/?p=10627
Extensions
A new blog location
Uncategorized
I have decided to move Andrzej’s C++ blog to a new location. It is now at https://thecppway.com and has been rebranded to The C++ way. You will now get a more modest experience, but without disturbing advertisements and with the … Continue reading →
akrzemi1
http://akrzemi1.wordpress.com/?p=10629
Extensions
Event-driven flows
programmingBoostC++20coroutinesgotchasresource handling
This post is in response to two claims about coroutines: Their reference function parameters may become dangling too easily. They are indistinguishable from regular functions from the declaration alone. But rather than talking about coroutines, we will look at event-driven … Continue reading →
akrzemi1
http://akrzemi1.wordpress.com/?p=10573
Extensions
Concepts vs type traits
programmingC++20conceptsgeneric programming
What is the difference between a concept and a type trait? Note that you can create a type trait using a requires-expression: You can also constrain a template with a type trait using a requires-clause: There are differences though. Some … Continue reading →
akrzemi1
http://akrzemi1.wordpress.com/?p=10531
Extensions
Class invariants
programmingcontractscorrectnessresource handlingstating intentions
The primary motivation for defining a class in C++ is to reflect and maintain a class invariant. In this post we will see what class invariants are and how you deal with them. Class invariants are important part of C++, … Continue reading →
akrzemi1
http://akrzemi1.wordpress.com/?p=10499
Extensions
The double life of objects
programmingadvanced-c++value semantics
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 … Continue reading →
akrzemi1
http://akrzemi1.wordpress.com/?p=10474
Extensions
The obvious final step
programmingcorrectnessdestructorsexception handlingidioms
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, … Continue reading →
akrzemi1
http://akrzemi1.wordpress.com/?p=10416
Extensions
A moved-from optional
programmingoptionalperformanceresource handlingvalue semantics
This post is in response to claims, that I have heard number of times, that the semantics of optional’s move operations are wrong: Some people are surprised that the second assert holds: the unfulfilled expectation is that moving from an … Continue reading →
akrzemi1
http://akrzemi1.wordpress.com/?p=10398
Extensions
Local Time
programmingC++20chrono
In this post we will see how to solve the task from the previous post, but display the time point in local time instead of system time. The solution is simple and takes only two additional lines (you can scroll … Continue reading →
akrzemi1
http://akrzemi1.wordpress.com/?p=10360
Extensions
Using std::chrono
programmingC++11C++20chrono
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, … Continue reading →
akrzemi1
http://akrzemi1.wordpress.com/?p=10324
Extensions