Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

Comments

C++: Support zero literal (0x0_address)#682

Draft
axic wants to merge 1 commit intomaster from
zero-literal
Draft

C++: Support zero literal (0x0_address) #682
axic wants to merge 1 commit intomaster from
zero-literal

Conversation

@axic
Copy link
Member

@axic axic commented Feb 13, 2023

No description provided.

@axic axic requested review from chfast, gumb0 and rodiazet February 13, 2023 20:59
Copy link

codecov bot commented Feb 13, 2023

Codecov Report

Merging #682 (25431fb) into master (97fac6f) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Additional details and impacted files
@@ Coverage Diff @@
## master #682 +/- ##
==========================================
+ Coverage 93.17% 93.20% +0.03% 
==========================================
 Files 25 25 
 Lines 3779 3784 +5 
 Branches 391 392 +1 
==========================================
+ Hits 3521 3527 +6 
 Misses 147 147 
+ Partials 111 110 -1 

@axic axic marked this pull request as draft February 13, 2023 21:17
constexpr T parse(std::string_view s) noexcept
{
return from_hex<T>(s).value();
auto const v = from_hex<T>(s);
Copy link
Member Author

Choose a reason for hiding this comment

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

The failure case is also used for parsing errors, including odd nibbles.

Need to rethink.

EXPECT_EQ(std::hash<evmc::bytes32>{}(eb), static_cast<size_t>(0xbb14e5c56b477375));

const auto zero_address = 0x0_address;
EXPECT_EQ(zero_address, evmc::address{});
Copy link
Member

Choose a reason for hiding this comment

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

These can be static_asserts I think.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@chfast chfast Awaiting requested review from chfast

@rodiazet rodiazet Awaiting requested review from rodiazet

1 more reviewer

@gumb0 gumb0 gumb0 left review comments

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /