-
Notifications
You must be signed in to change notification settings - Fork 181
from_chars integer parser #231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
a91521f
Added basic tests for fast_int in fast_int.cpp
2fb5969
Added more test cases that checks for correct errors, base 2, octal, …
122220e
Version 1 of from_chars integer parser
mayawarrier c9527c2
Skip leading zeros
mayawarrier e60b474
Added test cases that coverunsigned, out or range errors, char pointe…
3d446f1
Fix gcc werrors
mayawarrier 7a21a8d
Return invalid_argument in more places
mayawarrier 20c9375
Added new test cases for out of range errors that cover 8,16,32,64 bi…
e4702e0
Fixing cmake errrors
f904694
Merge pull request #1 from mayawarrier/main
marvinyywu 5fda2cc
Debugging results
681eb1e
More details to basic test error for debugging
0711006
Fixed messages
ebc15be
Added test case for numbers within range after converted from base
624ba49
Fix more Werrors
mayawarrier 5fcc62a
Merge contributed tests
mayawarrier 01e8c50
Fix bugs in tests/fast_int.cpp
mayawarrier a30fe86
Fix bugs highlighted in tests
mayawarrier 30b3165
Fix fast_int test Werrors
mayawarrier 36aaded
Fix handling of leading zeros
mayawarrier 26a5b2e
Added test case for ignoring leading zeros for all bases
marvinyywu bdee16b
- Add SIMD acceleration to fast_int
mayawarrier a59a62c
Merge branch 'fastfloat:main' into main
mayawarrier 882a716
Explicit curly bracket where suggested
mayawarrier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not mind this change per se, but can you explain why this was changed? Is there a reason?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so that I can perform enable_if checks in this form:
typename = FASTFLOAT_ENABLE_IF(...)instead of
FASTFLOAT_ENABLE_IF(...) = 0The first form (default argument for a type parameter) is used in a template declaration in fast_float.h. Default arguments can only be specified once, so the template definition in parse_number.h cannot have it. With the first form, I can write the definition by just adding an extra 'typename', but with the second form I would have to repeat the FASTFLOAT_ENABLE_IF(...) again. I thought it best to keep it one place. With both, changing only one of them causes some not-so-obvious linker errors.