Tip 25 of #TuesdayCodingTips - User-defined literals
C++ has many built-in literals for disambiguating types of constants, such as 'u' for unsigned, 'f' for float, or time-related literals from the chrono header (like ms, h, or min).
The really cool thing is that you can define your own literals (since C++11) to make your domain-specific constants more legible. All these literals overload the operator "" with your custom _suffix. The data type that is supposed to be before _suffix is then determined by the function parameter type (consult the documentation for allowed parameter types: https://en.cppreference.com/w/cpp/language/user_literal ).
Thanks to compile-time computing, these literals don't have to imply any runtime overhead for your code.
An interesting use-case that I found is that literals can be leveraged to make described bool constants without having to wrap them in a temporary.
One has to wonder if the Israel/Hamas war was an intentional distraction from this.
https://www.weforum.org/events/annual-meeting-of-the-global-future-councils-2023
"It took us 220 years and 43 presidents to get us to $9 trillion in public debt in July 2007.
"We've now added $9 trillion dollars in debt over the last four years.
"Who has enabled this? The Federal Reserve." - @da_stockman