Remove obsolete NODISCARD ifdef forest. Use [[nodiscard]] (C++17). #20499
Remove obsolete NODISCARD ifdef forest. Use [[nodiscard]] (C++17). #20499maflcko merged 2 commits intobitcoin:masterfrom
Conversation
|
Now that the ifdef forest is removed, is there an advantage to redefining |
-BEGIN VERIFY SCRIPT- sed -i "s/NODISCARD/[[nodiscard]]/g" $(git grep -l "NODISCARD" ":(exclude)src/bench/nanobench.h" ":(exclude)src/attributes.h") -END VERIFY SCRIPT-
d929f43 to
79bff8e
Compare
|
@fanquake No, not at all: I just wanted to keep the diff down. But you have a good point: using |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
…discard]] (C++17) ------------- BEGIN SCRIPT --------------- gsed -i "s/NODISCARD/[[nodiscard]]/g" $(git grep -l "NODISCARD" ":(exclude)src/bench/nanobench.h" ":(exclude)src/attributes.h") ------------- END SCRIPT ---------------
partial bitcoin#15638, bitcoin#21966, bitcoin#16889, merge bitcoin#14555, bitcoin#20499, bitcoin#14074, bitcoin#17073: util refactoring
Summary: > scripted-diff: Use [[nodiscard]] (C++17) instead of NODISCARD > > ``` > -BEGIN VERIFY SCRIPT- > sed -i "s/NODISCARD/[[nodiscard]]/g" $(git grep -l "NODISCARD" ":(exclude)src/bench/nanobench.h" ":(exclude)src/attributes.h") > -END VERIFY SCRIPT- > ``` > Remove NODISCARD This is a backport of [[bitcoin/bitcoin#20499 | core#20499]] Depends on D10888 Test Plan: `ninja all check-all` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D10889
…discard]] (C++17) ------------- BEGIN SCRIPT --------------- gsed -i "s/NODISCARD/[[nodiscard]]/g" $(git grep -l "NODISCARD" ":(exclude)src/bench/nanobench.h" ":(exclude)src/attributes.h") ------------- END SCRIPT ---------------
71a8dbe refactor: Remove defunct attributes.h includes (Ben Woosley) Pull request description: Since the removal of NODISCARD in 81d5af4, the only attributes.h def is LIFETIMEBOUND, and it's included in many more places that it is used. This removes all includes which do not have an associated use of LIFETIMEBOUND, and adds it to the following files, due to their use of the same: * src/validationinterface.h * src/script/standard.h See also #20499. Top commit has no ACKs. Tree-SHA512: f3e10a5cda5ab78371b77b702f4a241ff69d490a16cc6059f1a4202b97c584accdbc951cc7b6120eae94bee3b9249e9117b45cf6ed1a5228ca23b5638fcf7b7b
71a8dbe refactor: Remove defunct attributes.h includes (Ben Woosley) Pull request description: Since the removal of NODISCARD in 81d5af4, the only attributes.h def is LIFETIMEBOUND, and it's included in many more places that it is used. This removes all includes which do not have an associated use of LIFETIMEBOUND, and adds it to the following files, due to their use of the same: * src/validationinterface.h * src/script/standard.h See also bitcoin#20499. Top commit has no ACKs. Tree-SHA512: f3e10a5cda5ab78371b77b702f4a241ff69d490a16cc6059f1a4202b97c584accdbc951cc7b6120eae94bee3b9249e9117b45cf6ed1a5228ca23b5638fcf7b7b
Remove obsolete
NODISCARDifdefforest. Use[[nodiscard]](C++17).