]> code.bitgloo.com Git - clyne/constexpr-to-string.git/log
clyne/constexpr-to-string.git
7 months agoremove unnecessary const #7 master
Clyne Sullivan [Thu, 2 Jan 2025 18:46:46 +0000 (13:46 -0500)]
remove unnecessary const #7

copied from https://github.com/tcsullivan/constexpr-to-string/pull/7, forgot that github is a mirror now

2 years agosupport c++14
Clyne Sullivan [Wed, 8 Feb 2023 13:43:07 +0000 (08:43 -0500)]
support c++14

5 years agomake digits inline; simplify digit_count
clyne [Mon, 29 Jun 2020 19:39:24 +0000 (15:39 -0400)]
make digits inline; simplify digit_count

5 years agoMatch namespaces
clyne [Mon, 29 Jun 2020 19:21:06 +0000 (15:21 -0400)]
Match namespaces

5 years agoMerge pull request #3 from SecMeant/digits_array
clyne [Mon, 29 Jun 2020 19:17:38 +0000 (15:17 -0400)]
Merge pull request #3 from SecMeant/digits_array

Removing magic constant from template param check

5 years agoAdding constexpr_to_string namespace 3/head
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.

5 years agoMerge branch 'master' into digits_array
clyne [Mon, 29 Jun 2020 17:21:04 +0000 (13:21 -0400)]
Merge branch 'master' into digits_array

5 years agoUpdate README.md
clyne [Sun, 28 Jun 2020 16:33:42 +0000 (12:33 -0400)]
Update README.md

5 years agoUpdate readme for f_to_string
clyne [Sun, 28 Jun 2020 13:27:46 +0000 (09:27 -0400)]
Update readme for f_to_string

5 years agoremoved unnecessary base support
clyne [Sun, 28 Jun 2020 13:22:44 +0000 (09:22 -0400)]
removed unnecessary base support

5 years agoadded f_to_string
Clyne Sullivan [Sun, 28 Jun 2020 13:21:03 +0000 (09:21 -0400)]
added f_to_string

5 years agoadded f_to_string
Clyne Sullivan [Sun, 28 Jun 2020 13:20:12 +0000 (09:20 -0400)]
added f_to_string

5 years agoChanged other base instance to signed
clyne [Sat, 27 Jun 2020 23:13:18 +0000 (19:13 -0400)]
Changed other base instance to signed

5 years agoMerge pull request #1 from EnilPajic/patch-1-negative-minimum-value
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

5 years agoChange base from unsigned to signed 1/head
clyne [Sat, 27 Jun 2020 23:08:48 +0000 (19:08 -0400)]
Change base from unsigned to signed

5 years agoMerge branch 'master' into patch-1-negative-minimum-value
clyne [Sat, 27 Jun 2020 23:02:24 +0000 (19:02 -0400)]
Merge branch 'master' into patch-1-negative-minimum-value

5 years agoadd const and references to container operations
Clyne Sullivan [Sat, 27 Jun 2020 22:37:33 +0000 (18:37 -0400)]
add const and references to container operations

5 years agoUse end() in constructor
Clyne Sullivan [Sat, 27 Jun 2020 22:31:53 +0000 (18:31 -0400)]
Use end() in constructor

5 years agoMerge pull request #4 from Neargye/master
clyne [Sat, 27 Jun 2020 22:14:43 +0000 (18:14 -0400)]
Merge pull request #4 from Neargye/master

container-like

5 years agocontainer-like 4/head
neargye [Sat, 27 Jun 2020 16:35:10 +0000 (21:35 +0500)]
container-like

5 years agoStoring digits in variable, thus removing magic constant from template param check
SecMeant [Fri, 26 Jun 2020 23:22:24 +0000 (01:22 +0200)]
Storing digits in variable, thus removing magic constant from template param check

5 years agoUpdate "how it works" section
clyne [Fri, 26 Jun 2020 22:56:13 +0000 (18:56 -0400)]
Update "how it works" section

5 years agoAdd note on custom character types
clyne [Fri, 26 Jun 2020 22:50:47 +0000 (18:50 -0400)]
Add note on custom character types

5 years agoAdd support for range-based for loops
clyne [Fri, 26 Jun 2020 22:11:57 +0000 (18:11 -0400)]
Add support for range-based for loops

5 years agoAdd support for different character widths
clyne [Fri, 26 Jun 2020 22:05:11 +0000 (18:05 -0400)]
Add support for different character widths

5 years agoForgot to support to_string<0>
clyne [Fri, 26 Jun 2020 21:47:48 +0000 (17:47 -0400)]
Forgot to support to_string<0>

5 years agoRemove resolved issue with GCC/C++17
clyne [Fri, 26 Jun 2020 20:43:20 +0000 (16:43 -0400)]
Remove resolved issue with GCC/C++17

5 years agoInitialize buf for C++17 GCC; make to_string constexpr
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/

5 years agoFixed potential bug with -MINIMUM_VALUE
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.

5 years agoAdded explanation of code
clyne [Fri, 26 Jun 2020 17:42:41 +0000 (13:42 -0400)]
Added explanation of code

5 years agoDescribed new changes
clyne [Fri, 26 Jun 2020 17:14:54 +0000 (13:14 -0400)]
Described new changes

5 years agoRemove redundant length calculation; expand base support to 36
clyne [Fri, 26 Jun 2020 17:12:14 +0000 (13:12 -0400)]
Remove redundant length calculation; expand base support to 36

5 years agoAdded compiler explorer link
clyne [Fri, 26 Jun 2020 15:16:59 +0000 (11:16 -0400)]
Added compiler explorer link

5 years agoUpdate README.md
clyne [Fri, 26 Jun 2020 15:13:25 +0000 (11:13 -0400)]
Update README.md

5 years agoCreate to_string.hpp
clyne [Fri, 26 Jun 2020 15:02:37 +0000 (11:02 -0400)]
Create to_string.hpp

5 years agoInitial commit
clyne [Fri, 26 Jun 2020 14:47:36 +0000 (10:47 -0400)]
Initial commit