Entries by Rainer Grimm

Feature Testing with C++20

When your program’s compilation broke with a brand-new C++20 feature, you often end with a few questions: Did I do something wrong? Did I find a compiler bug? Does my compiler not yet support this feature? Thanks to the feature testing in C++20, the last question is easy to answer.

Calendar and Time-Zones in C++20: Time of Day

With C++20, the chrono library from C++11 receives essential additions. The most prominent ones are calendar and time-zones support. But this is by far not all. C++20 gets new clocks, powerful formatting functionality for time durations, and a time-of-day type.

More and More Utilities in C++20

Today, I present a few utilities for calculating the midpoint of two values, checking if a std::string starts or ends with a substring, and creating callables with std::bind_front. These little utilities may not seem so minor when you need them.