Logo

Blog


C++

Move in C++ without a std::move

In one of my earlier posts, Why you should use std::move only rarely I said that you should use std::move only rarely. In today's post, I would like to show you the benefits of [...]
C++

More compile-time checks with std::nullptr_t

In today's post, I like to show you the benefit of a often unknown type: std::nullptr_t. [...]
C++

More C++26 reflection at compile-time

In today's post, I like touch-up on C++26's static reflection. In case you haven't seen, I wrote a first post C++26 reflection at compile-time a while ago. [...]
C++

From Undefined to Defined: Using std::launder in C++

In today's post, I will continue with the overall topics of the last two months. Today you'll learn when and where you need to apply C++17's std::launder and where the difference [...]
C++

What reinterpret_cast doesn't do

In today's post, I will explain one of C++'s biggest pitfalls: reinterpret_cast. Another title for this post could be: This is not the cast you're looking for! [...]
C++

Best performance of a C++ singleton

In my Januray post, I focused on implementing a singleton correctly. This time I want to add performance into the mix and show you the best way to implement your singleton... or [...]
C++

The Reset trick

My last month's post, Singleton done right in C++, has triggered plenty of comments. I expected a few, but not that much. So thank you for keeping the conversation going. [...]
C++

Singleton done right in C++

In today's post, I like to touch on a controversial topic: singletons. While I think it is best to have a codebase without singletons, the real-world shows me that singletons are [...]
C++

C++20s std::source_location in action

In today's post, I want to address a question I'm getting occasionally when teaching a C++20 class. From the plenty of new features that we got with C++20, one sticks out as [...]
C++

C++20s concepts with a forward declared type

In today's post, I would like to continue talking about forward declared or better incomplete types in C++. [...]