MarcoFalke
commented at 7:04 pm on January 26, 2022:
member
This is for CI and devs only and doesn’t change that C++17 is the standard we are currently using. The option --enable-c++20 allows CI to check that the C++17 code in the repo is also valid C++20. (There are some cases where valid C++17 doesn’t compile under C++20).
Also, it allows developers to easily play with C++20 in the codebase.
MarcoFalke added the label
Build system
on Jan 26, 2022
MarcoFalke added this to the milestone Future
on Jan 26, 2022
PastaPastaPasta
commented at 8:28 am on January 27, 2022:
contributor
I was planning on doing the equivalent here, but didn’t want to until we could merge #23340 which if I recall correctly is required to fix cxx20 builds
jonatack
commented at 4:34 pm on January 27, 2022:
member
Concept ACK
fanquake
commented at 10:02 am on February 11, 2022:
member
MarcoFalke renamed this:
[WIP DRAFT] build: Add --enable-c++20 option
build: Add --enable-c++20 option
on Feb 11, 2022
MarcoFalke marked this as ready for review
on Feb 11, 2022
MarcoFalke removed this from the milestone Future
on Feb 11, 2022
MarcoFalke marked this as a draft
on Feb 11, 2022
DrahtBot
commented at 8:01 am on February 15, 2022:
member
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Conflicts
No conflicts as of last run.
DrahtBot added the label
Needs rebase
on Feb 17, 2022
MarcoFalke force-pushed
on Feb 17, 2022
MarcoFalke force-pushed
on Feb 17, 2022
MarcoFalke force-pushed
on Feb 17, 2022
DrahtBot removed the label
Needs rebase
on Feb 17, 2022
MarcoFalke force-pushed
on Feb 21, 2022
MarcoFalke force-pushed
on Feb 21, 2022
MarcoFalke force-pushed
on Feb 21, 2022
MarcoFalke force-pushed
on Feb 23, 2022
MarcoFalke force-pushed
on Feb 23, 2022
fanquake
commented at 11:49 am on February 23, 2022:
member
If you want to split the macro update off, happy to merge that earlier, given it’s a mechanical change.
MarcoFalke force-pushed
on Mar 2, 2022
felipsoarez
commented at 4:34 pm on March 2, 2022:
none
utACK
fanquake referenced this in commit
cc70f65d21
on Mar 4, 2022
sidhujag referenced this in commit
b8252ff751
on Mar 5, 2022
MarcoFalke force-pushed
on Mar 7, 2022
MarcoFalke force-pushed
on Mar 7, 2022
MarcoFalke force-pushed
on Mar 7, 2022
MarcoFalke marked this as ready for review
on Mar 10, 2022
MarcoFalke force-pushed
on Mar 10, 2022
fanquake
commented at 10:56 am on March 11, 2022:
member
Concept ACK. I think having the developer option, and carrying some number of code changes to support c++20 compilation is fine, but it’s going to be a long time before we can make it a requirement.
MarcoFalke force-pushed
on Mar 17, 2022
MarcoFalke force-pushed
on Mar 17, 2022
MarcoFalke
commented at 1:03 pm on March 17, 2022:
member
ryanofsky
commented at 8:08 pm on March 17, 2022:
member
Code review ACKfa442133f1ea37edb7c769590da9592b541fce6c. All these changes look safe to me, and it is definitely better if the code is tested with c++20 and compiles without changes.
A lot of changes are made in the PR without an explanation about the reason, though. Like the enum-enum warning change and scheduler lambda change. Ideally the changes would be broken up more, with one change per commit, and the commit messages would explain the reasons behind the changes, or at least give hints.
MarcoFalke force-pushed
on Mar 17, 2022
MarcoFalke
commented at 8:56 pm on March 17, 2022:
member
Thx, done. (No code changes)
ryanofsky approved
ryanofsky
commented at 9:02 pm on March 17, 2022:
member
Code review ACKfab63ca14298d37022e23d3e9747bc4bf94121c9. Thanks for the descriptions, I understand this much better now!
fanquake
commented at 10:54 am on March 18, 2022:
member
theStack
commented at 5:34 pm on March 19, 2022:
member
Concept and code-review ACKfab63ca14298d37022e23d3e9747bc4bf94121c9 :two: :zero:
Tested --enable-c++20 compilation with clang 11.1.0 (OpenBSD 7.0).
hebasto
commented at 7:22 am on March 21, 2022:
member
Concept ACK.
hebasto
commented at 10:21 am on March 21, 2022:
member
Approach ACKfab63ca14298d37022e23d3e9747bc4bf94121c9, except for the fa08f8b8cd4eb13cc5904d33e027f6c485b9f4b1 “Set -Wno-deprecated-enum-enum-conversion” commit. An alternative has been suggested in #24624.
MarcoFalke
commented at 8:10 am on March 22, 2022:
member
I’d say the two pull requests are mostly orthogonal. If one is merged before the other, the one merged second can drop the temporary -Wno commit.
hebasto approved
hebasto
commented at 9:56 am on March 22, 2022:
member
ACKfab63ca14298d37022e23d3e9747bc4bf94121c9
I’d say the two pull requests are mostly orthogonal. If one is merged before the other, the one merged second can drop the temporary -Wno commit.
Agree.
MarcoFalke referenced this in commit
f05cf59d91
on Mar 22, 2022
MarcoFalke
commented at 12:44 pm on March 22, 2022:
member
Removed a commit. Should be trivial to re-ACK.
MarcoFalke force-pushed
on Mar 22, 2022
hebasto approved
hebasto
commented at 1:34 pm on March 22, 2022:
member
~re-ACKfa6bc3b2ccb7386ed496dd8be6b748e95c28b957~
CI failure?
MarcoFalke
commented at 3:39 pm on March 22, 2022:
member
Please review #24641 first, while this fails to compile.
MarcoFalke marked this as a draft
on Mar 22, 2022
scheduler: Capture ‘this’ explicitly in lambda
Without the changes, g++ will warn to compile under C++20:
scheduler.cpp:114:21: warning: implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20 [-Wdeprecated]
114 | scheduleFromNow([=] { Repeat(*this, f, delta); }, delta);
| ^
scheduler.cpp:114:21: note: add explicit ‘this’ or ‘*this’ capture
fae2220f4e
Make fs.h C++20 compliant
Without the changes, the file will fail to compile under C++20 because
char8_t can not be converted to char implicitly.
fabb7c4ba6
MarcoFalke marked this as ready for review
on Mar 24, 2022
Add CSerializedNetMsg::Copy() helper
This makes code that uses the helper less verbose.
Moreover, this makes net_processing C++20 compliant. Otherwise, it would
lead to a compile error (see below). C++20 disables aggregate
initialization when any constructor is declared. See
http://open-std.org/JTC1/SC22/WG21/docs/papers/2018/p1008r1.pdf
net_processing.cpp:1627:42: error: no matching constructor for initialization of 'CSerializedNetMsg'
m_connman.PushMessage(pnode, CSerializedNetMsg{ser_cmpctblock.data, ser_cmpctblock.m_type});
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fae679065e
build: Add --enable-c++20 option999982b06c
MarcoFalke force-pushed
on Mar 24, 2022
ryanofsky approved
ryanofsky
commented at 12:20 pm on March 24, 2022:
member
Code review ACK999982b06ce1d1280e5ce48f9253c6c536f41a12. Since last review was rebased, and enum-conversion change was dropped, and CSerializedNetMsg copy workaround was added
fanquake approved
fanquake
commented at 1:00 pm on March 24, 2022:
member
utACK999982b06ce1d1280e5ce48f9253c6c536f41a12
fanquake merged this
on Mar 24, 2022
fanquake closed this
on Mar 24, 2022
MarcoFalke deleted the branch
on Mar 24, 2022
Sjors
commented at 9:26 am on March 26, 2022:
member
Nice! Though macOS trips over a deprecation (warning), see #24682.
sidhujag referenced this in commit
aad46d4291
on Apr 2, 2022
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2024-11-17 21:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me