forked from dashpay/dash
-
Notifications
You must be signed in to change notification settings - Fork 717
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
Span sources updates, up-to-date with current upstream. #2470
Merged
random-zebra
merged 15 commits into
PIVX-Project:master
from
furszy:2021_span_backports
Jul 21, 2021
Merged
Span sources updates, up-to-date with current upstream. #2470
random-zebra
merged 15 commits into
PIVX-Project:master
from
furszy:2021_span_backports
Jul 21, 2021
Conversation
This file contains 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 introduces a rudimentary begin(), end(), operator[], and subspan to Span.
from btc@2b0fcff7f26d59fed4bcafd1602325122a206c67
This matches a change in the C++20 std::span proposal.
This prevents constructing a Span<A> given two pointers into an array of B (where B is a subclass of A), at least without explicit cast to pointers to A.
c++20's draft of std::span no longer includes move constructors.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0936r0.pdf for reference. This helps to guard against dangling references caused by construction from temporaries such as: Span<const int> sp(std::vector<int>{1,2,3});
Co-authored-by: practicalswift <practicalswift@users.noreply.github.com>
Based on a suggestion by Russell Yanofsky.
Adapted from btc@e2aa1a585a83971639572cd2c84565ec360deac9
b01b63c
to
a1f3aed
Compare
random-zebra
approved these changes
Jul 16, 2021
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.
Tested ACK a1f3aed
perpetual updating PIVX Core to BTC Core
automation
moved this from In Progress
to Done
Jul 21, 2021
random-zebra
added a commit
that referenced
this pull request
Aug 16, 2021
d4408cd Make HexStr() take a Span (furszy) 4c755ec dead code: Remove dead option in HexStr conversion. (Lenny Maiorani) Pull request description: Follow up to #2470. Only the last two commits are from this work. Make `HexStr` take a span of bytes, instead of an awkward pair of templated iterators. Simplifying most of the uses. Adaptation of bitcoin#19660 and bitcoin#15573. ACKs for top commit: random-zebra: utACK d4408cd Tree-SHA512: 541f80e1af9abea2d662e5fc31fc4d5b4057ff93eefeba5632c6ddca391f3b148c8d819a56802720c3932c3c2afb69ddd1efb4890a59ecf1bf5afd6686cd5a67
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Another decouple from #2411.
Purely focused on updating the Span sources to be up-to-date with current upstream.
Following PRs/commits were back ported:
Extra side note:
Some of the current serialization compiler warnings in master will be fixed with this, other ones are coming down 2411 commits line as they need other previous PRs.