-
Notifications
You must be signed in to change notification settings - Fork 326
cpp: Add support for _uint256be literals #596
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #596 +/- ##
==========================================
+ Coverage 92.84% 93.81% +0.96%
==========================================
Files 23 25 +2
Lines 3552 3769 +217
Branches 376 0 -376
==========================================
+ Hits 3298 3536 +238
- Misses 144 233 +89
+ Partials 110 0 -110 |
chfast
left a comment
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.
Are you going to use it?
|
What will be confusing here is that these literals are required to have exactly 64 hex digits. |
I was adding
Yeah I was wondering if it would make sense make this work on decimal instead. Probably better holding the merge back a bit. |
Unless there exist some simplified algorithm for decimal literals I'm not aware of, this requires implementing multiplication by 10. https://github.com/chfast/intx/blob/master/include/intx/int128.hpp#L893 |
|
@chfast leaning towards that even with base 16 this may be useful |
Only extending the literal tests, because the other tests are covered via bytes32 tests given uint256be is an alias.
|
Rebased. I think this is still useful for unit tests, based on |
Only extending the literal tests, because the other tests are covered
via bytes32 tests given uint256be is an alias.