Parsing Numbers At Compile Time with C++17, C++23, and C++26
Thanks to the powerful constexpr keyword and many enhancements in recent C++ standards, we can now perform a lot of computations at compile time. In this text, we’ll explore several techniques for parsing integers, including the “naive” approach, C++23, from_chars, std::optional, std::expected, and even some upcoming features in C++26.
But first… why would this even be needed?
C++ Stories