Posts
Sandor Dargo's Blog
Cancel

Avoiding Undefined Behaviour with BoostTests and standard types

Maybe the title is a bit clickbaity — sorry for that. But I’ve seen many people unintentionally introduce undefined behaviour (UB) into their code through Boost unit tests. Sure, it’s “only” in the...

Format your own type (Part 2)

Last week, we discussed how to write our own formatter and finished with a relatively simple solution for printing a struct called ProgrammingLanguage. Today, we’ll take it to the next level. Add ...

Format your own type (Part 1)

I recently published two posts about how C++26 improves std::format and the related facilities. (If you missed them, here are Part 1 and Part 2). Now it’s time to explore how you can format your ow...

C++26: std::format improvements (Part 2)

In Part 1, we explored the improvements C++26 brings to std::format — from better to_string behavior to compile-time safety checks. In this part, we look at runtime formatting, defect fixes, and su...

C++26: std::format improvement (Part 1)

C++26 brings a series of improvements to std::format, continuing the work started in C++20 and refined in C++23. These changes improve formatting consistency, runtime safety, and user ergonomics. T...

Trip report: C++ On Sea 2025

Another year, another trip report from C++ On Sea! First, a heartfelt thank-you to the organizers for inviting me to speak, and an equally big thank-you to my wife for taking care of the kids whil...

Once more about dynamic_cast, a real use case

I wrote a couple of times about dynamic_cast and I discouraged you from using it. In general, it makes code worse in terms of readability. When you get rid of dynamic_cast, either via self-discipli...

Variadic class template arguments

Let’s talk about class templates and variadic parameters. How to use them in combination? But first of all, what are variadic templates? Variadic template don’t accept a fixed size of parameters,...

C++26: Disallow Binding a Returned Reference to a Temporary

In short, thanks to P2748R5 by Brian Bi, it’s no longer possible to return a reference that binds to a temporary expression, and that’s just lovely. What exactly is changing? Often, a proposal mo...

What Makes a C++ Talk Stand Out in the Review Process?

Let’s talk about getting into conferences. I’ve already shared my path into conference speaking, and more recently, Andre Schau Knatten wrote about how to become a conference speaker. As the ques...