Logo

Blog


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++. [...]
C++

Forward declaring a type in C++: The good, and the bad

In today's post, I would like to shed some light on the implications of forward declaring a type in C++. [...]
C++

Efficient C++: The hidden compile-time cost of auto return types

In today's post, I would like to dive into writing efficient C++ code. As you probably know, one post will not cover this entire topic. For today's post, I like to focus on [...]