|
|
@ -5,7 +5,6 @@
|
|
|
|
* Convert any integral type to a string at compile-time
|
|
|
|
* Convert any integral type to a string at compile-time
|
|
|
|
* Supports converting to any base between 2 and 36 inclusive
|
|
|
|
* Supports converting to any base between 2 and 36 inclusive
|
|
|
|
* No external dependencies, only includes `type_traits` for template parameter checking
|
|
|
|
* No external dependencies, only includes `type_traits` for template parameter checking
|
|
|
|
* Works best in C++20 GCC or C++17/20 Clang
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**How to use:**
|
|
|
|
**How to use:**
|
|
|
|
|
|
|
|
|
|
|
@ -22,10 +21,6 @@ With `to_string`, all that will be found in program disassembly are the resultin
|
|
|
|
|
|
|
|
|
|
|
|
Try it [on Compiler Explorer](https://godbolt.org/z/T-MFoh).
|
|
|
|
Try it [on Compiler Explorer](https://godbolt.org/z/T-MFoh).
|
|
|
|
|
|
|
|
|
|
|
|
**Known issues:**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* With C++17 GCC, `to_string` must be used to initialize variables; otherwise, the integer-string conversion is done at run-time.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# How it works
|
|
|
|
# How it works
|
|
|
|
|
|
|
|
|
|
|
|
The basic structure of `to_string` is shown below:
|
|
|
|
The basic structure of `to_string` is shown below:
|
|
|
|