Skip to content
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

add binary number parsing #271

Closed
wants to merge 1 commit into from
Closed

Conversation

khris190
Copy link

that's pretty much it, i needed(wanted) binary numbers, its my first contribution to any project ever so i hope its not stupid

scientific = 0xf1,
fixed = 0xf2,
hex = 0xf4,
bin = 0xf8,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change the one-hot encoding to set all the upper bits?

Copy link
Author

@khris190 khris190 Jul 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because radix_2 = 2 collides with fixed in template struct parse_number<T, chars_format::fixed> on line 383

@ismagilli
Copy link
Contributor

Hello! Congratulations on the first contribution. In addition to the code that adds new functionality, it is highly desirable to also write tests and a documentation with examples in README.md. As an example for tests, look at the test/test_scan.cpp file. And as for the documentation, if I'm not mistaken, there is only one place about the various integer formats -- the table before the "Default Arguments" section.

@p-ranav
Copy link
Owner

p-ranav commented Nov 6, 2023

Merged in #306

@p-ranav p-ranav closed this Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants