Improved CustomBuildField for std::optional in IPC/libmultiprocess #34797

pull mangoostaa wants to merge 1 commits into bitcoin:master from mangoostaa:feature/optional-forward changing 1 files +1 −1
  1. mangoostaa commented at 9:17 AM on March 11, 2026: none

    The function now uses std::forward<Value>(value) when building the field, so rvalues are forwarded correctly instead of always being treated as lvalues. This resolves the existing FIXME in that code path.

    Details Previously, the implementation forced every optional value to be accessed as an lvalue, which meant rvalues were unnecessarily copied. By applying perfect forwarding, the function now preserves the value category and allows moves where appropriate. The FIXME comment was removed since the intended behavior is now implemented

  2. Use std::forward in CustomBuildField for std::optional to allow move semantics, resolves FIXME b59d4dbcfa
  3. DrahtBot commented at 9:17 AM on March 11, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. sedited commented at 9:28 AM on March 11, 2026: contributor

    Can you open this against https://github.com/bitcoin-core/libmultiprocess/pulls ? We generally don't accept changes to subtrees in this repository.

  5. sedited closed this on Mar 11, 2026


github-metadata-mirror

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: 2026-05-02 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me