Calendar and Time-Zones in C++20: Calendar Dates
A new type of the chrono extension in C++20 is a calendar date. C++20 offers various ways to create a calendar date and interact with them.
This author has not written his bio yet.
But we are proud to say that Rainer Grimm contributed 702 entries already.
A new type of the chrono extension in C++20 is a calendar date. C++20 offers various ways to create a calendar date and interact with them.
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.
This post concludes my introduction to the chrono extension in C++20. Today I present the time-zones functionality.
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.
In my last post, “Calendar and Time Zone in C++20: Calendar Dates”, I presented the new calendar-related data types. Today, I go one step further and interact with them.
Peter Gottschling presented in his last post “std::format in C++20” the basics of the new formatting library in C++20. In today’s post, Peter writes about the formatting of user-defined types.
Today, I’m happy to present Peter Gottschling’s guest post to the new formatting library in C++20: std::format. Thanks to std::format, text formatting becomes in C++20 as easy as in Python.
Removing elements from a container or asking if an associative container has a specific key is too complicated. I should say it was because with C++20, the story changes.
Probably the most viral keyword in modern C++ is constexpr. With C++20, we have a constexpr std::vector and a constexpr std::string. Additionally, both containers can be manipulated with the constexpr algorithms of the Standard Template Library.
In my seminar, I often hear the question: How can I safely pass a plain array to a function? With C++20, the answer is quite easy: Use a std::span.
