Entries by Rainer Grimm

Solving the Static Initialization Order Fiasco with C++20

According to the FAQ of isocpp.org is the static initialization order fiasco “a subtle way to crash your program”. The FAQ continues: The static initialization order problem is a very subtle and commonly misunderstood aspect of C++. “. Today, I write about this very subtle and misunderstood aspect of C++.  

C++20: The Three-Way Comparison Operator

The three-way comparison operator <=> is often just called the spaceship operator. The spaceship operator determines whether A < B, A = B, or A > B for two values, A and B. You can define the spaceship operator, or the compiler can auto-generate it.

C++20: Further Open Questions to Modules

So far, I have written in my last four posts the basics you should know about modules in C++20. Only a few questions about modules are still open. In this post, I address these open questions, such as templates in modules, the linkage of modules, and header units.