]>
code.bitgloo.com Git - clyne/constexpr-to-string.git/log
summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
SecMeant [Mon, 29 Jun 2020 17:31:21 +0000 (19:31 +0200)]
Adding constexpr_to_string namespace
Namespace is used to prevent pollution of global namespace
by digits and digits_count symbols.
clyne [Mon, 29 Jun 2020 17:21:04 +0000 (13:21 -0400)]
Merge branch 'master' into digits_array
clyne [Sun, 28 Jun 2020 16:33:42 +0000 (12:33 -0400)]
Update README.md
clyne [Sun, 28 Jun 2020 13:27:46 +0000 (09:27 -0400)]
Update readme for f_to_string
clyne [Sun, 28 Jun 2020 13:22:44 +0000 (09:22 -0400)]
removed unnecessary base support
Clyne Sullivan [Sun, 28 Jun 2020 13:21:03 +0000 (09:21 -0400)]
added f_to_string
Clyne Sullivan [Sun, 28 Jun 2020 13:20:12 +0000 (09:20 -0400)]
added f_to_string
clyne [Sat, 27 Jun 2020 23:13:18 +0000 (19:13 -0400)]
Changed other base instance to signed
clyne [Sat, 27 Jun 2020 23:09:25 +0000 (19:09 -0400)]
Merge pull request #1 from EnilPajic/patch-1-negative-minimum-value
Fixed potential bug with -MINIMUM_VALUE
clyne [Sat, 27 Jun 2020 23:08:48 +0000 (19:08 -0400)]
Change base from unsigned to signed
clyne [Sat, 27 Jun 2020 23:02:24 +0000 (19:02 -0400)]
Merge branch 'master' into patch-1-negative-minimum-value
Clyne Sullivan [Sat, 27 Jun 2020 22:37:33 +0000 (18:37 -0400)]
add const and references to container operations
Clyne Sullivan [Sat, 27 Jun 2020 22:31:53 +0000 (18:31 -0400)]
Use end() in constructor
clyne [Sat, 27 Jun 2020 22:14:43 +0000 (18:14 -0400)]
Merge pull request #4 from Neargye/master
container-like
neargye [Sat, 27 Jun 2020 16:35:10 +0000 (21:35 +0500)]
container-like
SecMeant [Fri, 26 Jun 2020 23:22:24 +0000 (01:22 +0200)]
Storing digits in variable, thus removing magic constant from template param check
clyne [Fri, 26 Jun 2020 22:56:13 +0000 (18:56 -0400)]
Update "how it works" section
clyne [Fri, 26 Jun 2020 22:50:47 +0000 (18:50 -0400)]
Add note on custom character types
clyne [Fri, 26 Jun 2020 22:11:57 +0000 (18:11 -0400)]
Add support for range-based for loops
clyne [Fri, 26 Jun 2020 22:05:11 +0000 (18:05 -0400)]
Add support for different character widths
clyne [Fri, 26 Jun 2020 21:47:48 +0000 (17:47 -0400)]
Forgot to support to_string<0>
clyne [Fri, 26 Jun 2020 20:43:20 +0000 (16:43 -0400)]
Remove resolved issue with GCC/C++17
clyne [Fri, 26 Jun 2020 20:41:17 +0000 (16:41 -0400)]
Initialize buf for C++17 GCC; make to_string constexpr
https://www.reddit.com/r/cpp/comments/hgcaih/compiletime_integertostring_conversion_c17/fw3d2fm/
EnilPajic [Fri, 26 Jun 2020 19:25:39 +0000 (21:25 +0200)]
Fixed potential bug with -MINIMUM_VALUE
Original code had something like `N < 0 ? -N : N` which could fail if `N` has minimum value of appropriate type. For example, in original code this could fail:
```cpp
const long long int LL_MIN = std::numeric_limits<long long int>::min(); //probably: -
9223372036854775808
static const char *number = to_string<LL_MIN, 10>;
```
Also note that this code relies on "modulo on negative first operands" which was implementation defined in C++03 and before, but with C++11 and later it is defined by standard (see `ISO14882:2011(e)`), and this code anyway targets C++17 so we're safe here.
clyne [Fri, 26 Jun 2020 17:42:41 +0000 (13:42 -0400)]
Added explanation of code
clyne [Fri, 26 Jun 2020 17:14:54 +0000 (13:14 -0400)]
Described new changes
clyne [Fri, 26 Jun 2020 17:12:14 +0000 (13:12 -0400)]
Remove redundant length calculation; expand base support to 36
clyne [Fri, 26 Jun 2020 15:16:59 +0000 (11:16 -0400)]
Added compiler explorer link
clyne [Fri, 26 Jun 2020 15:13:25 +0000 (11:13 -0400)]
Update README.md
clyne [Fri, 26 Jun 2020 15:02:37 +0000 (11:02 -0400)]
Create to_string.hpp
clyne [Fri, 26 Jun 2020 14:47:36 +0000 (10:47 -0400)]
Initial commit