Repository navigation
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. External sites
ReviewsSee the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste 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. |
|
Concept ACK |
hebasto
left a comment
There was a problem hiding this comment.
iwyu incorrectly suggests to remove the util/expected include
This looks like IWYU's "Automatic re-export: function return values" heuristics in action.
6e970d2 to
450acb9
Compare
1) value() might be marked [[nodiscard]], so add the missing (void), where the value is ignored. 2) std::expected::value() must be able to throw std::bad_expected_access<E> if the expected contains an error. That requires copying the error type, which is not possible in this unit test that uses a non-copyable error type. Fix it by using the non-throwing value accessor.
|
thx, took some and replied to the others |

C++23 for Bitcoin Core is mostly a "style update" on top of C++20. However, the workarounds to avoid C++23 keep accumulating and some parts of the code already use C++23 features, such as lambda attributes (bitcoin-core/libmultiprocess@bdd0cd6).
I don't know when it is fine to switch, but at some point, I think it is fine to require a C++23 compiler, so that new stuff is unlocked. Of course this requires bumping the minimum required compiler versions:
There are some C++23 features that aren't implemented (such as
<stacktrace>not really shipped in any vanilla stdlib today), or e.g.ranges::starts_withnot implemented until libstdc++-16. But overall I think we are better off using C++23 without those few features instead of waiting longer?