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

cpp: Add all comparison operators for address and bytes32 #474

Merged
merged 2 commits into from
Dec 5, 2019

Conversation

axic
Copy link
Member

@axic axic commented Dec 3, 2019

No description provided.

@axic axic requested a review from chfast December 3, 2019 12:30
@chfast
Copy link
Member

chfast commented Dec 3, 2019

At this point, I think we should add all other comparison operators.

@axic
Copy link
Member Author

axic commented Dec 4, 2019

@chfast is this what you meant?

Need to squash them before merging. And need to include them in the unit tests. @chfast do you want to take this over?

@chfast
Copy link
Member

chfast commented Dec 4, 2019

@chfast is this what you meant?

Need to squash them before merging. And need to include them in the unit tests. @chfast do you want to take this over?

Yes. And yes, I will finish this.

@chfast chfast self-assigned this Dec 4, 2019
@chfast chfast force-pushed the cpp-operators branch 3 times, most recently from 32bde3f to 6b4805f Compare December 5, 2019 09:42
This makes the types easier to use in outside APIs.

Co-authored-by: Paweł Bylica <chfast@gmail.com>
@chfast chfast changed the title cpp: add "operator>" for address and bytes32 for making it easier to use in outside APIs cpp: Add all comparison operators for address and bytes32 Dec 5, 2019
@@ -50,7 +50,6 @@ using uint256be = bytes32;
/// Loads 64 bits / 8 bytes of data from the given @p bytes array in big-endian order.
constexpr inline uint64_t load64be(const uint8_t* bytes) noexcept
{
// TODO: Report bug in clang incorrectly optimizing this with AVX2 enabled.
Copy link
Member

Choose a reason for hiding this comment

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

@axic
Copy link
Member Author

axic commented Dec 5, 2019

Looks good to me!

@chfast chfast merged commit 0faf6d1 into master Dec 5, 2019
@chfast chfast deleted the cpp-operators branch December 5, 2019 14:54
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.

2 participants