There should be a lot of places where new C++ features can be used to simplify code, particularly concept features in C++20 so I'm starting to go through code and look for places where it can be modernized. Will collect the smaller cleanups in this PR and probably open other PRs with bigger cleanups.
c++ 20 cleanups #94
pull ryanofsky wants to merge 3 commits into bitcoin-core:master from ryanofsky:pr/cl1 changing 3 files +20 −42-
ryanofsky commented at 8:09 PM on February 28, 2024: collaborator
- ryanofsky force-pushed on Feb 28, 2024
- ryanofsky referenced this in commit 53ee9faf84 on Jun 13, 2024
-
c92e90ce08
proxy-types Drop JoinPromises function
Also add comments to explain code using it the PassField proxy.capnp Context overload
-
util: Get rid of unused Discard struct 1f76880dbf
-
6cbe56ef3b
refactor, moveonly: order lambda move captures first
Followup for https://github.com/chaincodelabs/libmultiprocess/pull/88
- ryanofsky force-pushed on Jun 13, 2024
-
fanquake commented at 3:12 PM on January 27, 2025: member
Maybe also time to revive these changes?
-
ryanofsky commented at 3:29 PM on January 27, 2025: collaborator
Added 1 commits 1f76880dbfca780a7ebdeaee9be4e532291c8245 -> 6cbe56ef3b38129314960eadc0824393fec089d9 (
pr/cl1.4->pr/cl1.5, compare) adding a new commit to make lambda capture order a little more consistent.There is more work that could be done here, but I'm about to merge this PR to clear backlog of libmultiprocess changes before bumping the version in bitcoin.
re: https://github.com/chaincodelabs/libmultiprocess/pull/94#issuecomment-2616027177
Maybe also time to revive these changes?
Yes, there is definitely more work that could be done to modernize the code, which was originally written using c++11. Should be able to happen in separate followups though.
- ryanofsky merged this on Jan 27, 2025
- ryanofsky closed this on Jan 27, 2025
- ryanofsky referenced this in commit 90b116bd70 on Jan 27, 2025
- ryanofsky referenced this in commit 2221c8814d on Jan 27, 2025
- Sjors referenced this in commit b66fe2fc03 on Jan 28, 2025
- fanquake referenced this in commit ad2f9324c6 on Jan 29, 2025
- janus referenced this in commit 311822f35f on Sep 1, 2025
- bitcoin-core locked this on Jan 27, 2026