forked from dashpay/dash
-
Notifications
You must be signed in to change notification settings - Fork 0
Merge bitcoin/bitcoin#28721: multiprocess compatibility updates #998
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
Closed
DashCoreAutoGuix
wants to merge
1
commit into
backport-0.27-batch-684
from
backport-0.27-batch-684-pr-28721
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| // Copyright (c) 2023 The Bitcoin Core developers | ||
| // Distributed under the MIT software license, see the accompanying | ||
| // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
|
||
| #include <span.h> | ||
|
|
||
| #include <boost/test/unit_test.hpp> | ||
| #include <array> | ||
| #include <set> | ||
| #include <vector> | ||
|
|
||
| namespace { | ||
| struct Ignore | ||
| { | ||
| template<typename T> Ignore(T&&) {} | ||
| }; | ||
| template<typename T> | ||
| bool Spannable(T&& value, decltype(Span{value})* enable = nullptr) | ||
| { | ||
| return true; | ||
| } | ||
| bool Spannable(Ignore) | ||
| { | ||
| return false; | ||
| } | ||
|
|
||
| #if defined(__clang__) | ||
| # pragma clang diagnostic push | ||
| # pragma clang diagnostic ignored "-Wunneeded-member-function" | ||
| # pragma clang diagnostic ignored "-Wunused-member-function" | ||
| #endif | ||
| struct SpannableYes | ||
| { | ||
| int* data(); | ||
| size_t size(); | ||
| }; | ||
| struct SpannableNo | ||
| { | ||
| void* data(); | ||
| size_t size(); | ||
| }; | ||
| #if defined(__clang__) | ||
| # pragma clang diagnostic pop | ||
| #endif | ||
| } // namespace | ||
|
|
||
| BOOST_AUTO_TEST_SUITE(span_tests) | ||
|
|
||
| // Make sure template Span template deduction guides accurately enable calls to | ||
| // Span constructor overloads that work, and disable calls to constructor overloads that | ||
| // don't work. This makes it is possible to use the Span constructor in a SFINAE | ||
| // contexts like in the Spannable function above to detect whether types are or | ||
| // aren't compatible with Spans at compile time. | ||
| // | ||
| // Previously there was a bug where writing a SFINAE check for vector<bool> was | ||
| // not possible, because in libstdc++ vector<bool> has a data() memeber | ||
| // returning void*, and the Span template guide ignored the data() return value, | ||
| // so the template substitution would succeed, but the constructor would fail, | ||
| // resulting in a fatal compile error, rather than a SFINAE error that could be | ||
| // handled. | ||
| BOOST_AUTO_TEST_CASE(span_constructor_sfinae) | ||
| { | ||
| BOOST_CHECK(Spannable(std::vector<int>{})); | ||
| BOOST_CHECK(!Spannable(std::set<int>{})); | ||
| BOOST_CHECK(!Spannable(std::vector<bool>{})); | ||
| BOOST_CHECK(Spannable(std::array<int, 3>{})); | ||
| BOOST_CHECK(Spannable(Span<int>{})); | ||
| BOOST_CHECK(Spannable("char array")); | ||
| BOOST_CHECK(Spannable(SpannableYes{})); | ||
| BOOST_CHECK(!Spannable(SpannableNo{})); | ||
| } | ||
|
|
||
| BOOST_AUTO_TEST_SUITE_END() |
This file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
🧹 Nitpick (assertive)
Note: Pre-existing grammar issues detected.
Static analysis flagged some grammar issues in this documentation, but these appear to be pre-existing problems not introduced by the current path corrections. The functional changes (path updates) are appropriate for the backport.
🧰 Tools
🪛 LanguageTool
[grammar] ~35-~35: Use articles correctly
Context: ...OCESS=1` option). Alternately, you can install Cap'n Proto a...
(QB_NEW_EN_OTHER_ERROR_IDS_11)
[grammar] ~35-~35: There might be a mistake here.
Context: ...elabs/libmultiprocess) packages on your system, and just run `./configure --enable-mul...
(QB_NEW_EN_OTHER)
[grammar] ~35-~35: Use articles correctly
Context: ...desktop.org/wiki/Software/pkg-config/). See [Installation](https://github.com/chain...
(QB_NEW_EN_OTHER_ERROR_IDS_11)
[grammar] ~35-~35: Use correct spacing
Context: ...mation about installing dependencies in general. ## IPC implementation details Cross proces...
(QB_NEW_EN_OTHER_ERROR_IDS_5)
🤖 Prompt for AI Agents