Structured iteration ↗
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/.
Paste any RSS 2.0 or Atom feed URL (or website homepage) to inspect its metadata and read its latest entries cleanly without raw XML.
Guidelines and thoughts about C++
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/.
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 advertisement...
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 t...
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 differe...
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++,...
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 thi...
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...
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...
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 … C...
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,...
Try our RSS Feed Finder or YouTube RSS Generator, or browse curated feeds in Discover.