refactor: Drop unused #include <boost/operators.hpp> #32668

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:250602-boost-operators changing 2 files +0 −2
  1. hebasto commented at 10:01 pm on June 2, 2025: member

    From https://api.cirrus-ci.com/v1/task/5082537556443136/logs/ci.log:

    0[10:04:20.418] /ci_container_base/src/node/mini_miner.cpp should remove these lines:
    1[10:04:20.418] - #include <boost/operators.hpp>  // lines 8-8
    
  2. refactor: Drop unused `#include <boost/operators.hpp>` 1e09c00239
  3. hebasto added the label Refactoring on Jun 2, 2025
  4. DrahtBot commented at 10:02 pm on June 2, 2025: contributor

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32668.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  5. maflcko commented at 5:23 am on June 3, 2025: member
    lgtm ACK 1e09c00239dafe7e9fa4f4d3f0d80c07bb7120bf
  6. maflcko commented at 5:26 am on June 3, 2025: member

    There are still some places where it is incorrectly suggested, but this seems unrelated:

    0[19:19:20.209] /ci_container_base/src/node/miner.cpp should add these lines:
    1[19:19:20.209] #include <boost/multi_index/detail/bidir_node_iterator.hpp>  // for operator==
    2[19:19:20.209] #include <boost/operators.hpp>                               // for operator!=
    
  7. fanquake commented at 7:57 am on June 3, 2025: member

    There are still some places where it is incorrectly suggested, but this seems unrelated:

    It seems related enough, especially if we are going to do #31308. This PR is pointing at the IWYU output to remove this include from 1 file, and doing so, but then ignoring the IWYU output saying to add it to multiple others? Seems like this could wait, or atleast be bundled with a change that adds a mapping file or similar, that makes the IWYU output make sense, otherwise how are devs meant to know when to “fix” includes based on the IWYU advice, or just ignore it?

  8. hebasto marked this as a draft on Jun 3, 2025
  9. maflcko commented at 11:01 am on June 3, 2025: member

    My understanding is that operators.hpp is an internal header (unless you use it to derive operators) and only indirectly included via other boost headers. So there is no universal mapping that could be used.

    The possible workarounds could be:

    0                           "boost/multi_index/detail/hash_index_iterator.hpp",
    1                           "boost/multi_index/hashed_index.hpp",
    2                           "boost/multi_index/identity.hpp",
    3                           "boost/multi_index/indexed_by.hpp",
    4                           "boost/multi_index/ordered_index.hpp",
    5                           "boost/multi_index/sequenced_index.hpp",
    6                           "boost/multi_index/tag.hpp",
    7                           "boost/multi_index_container.hpp",
    8                           "boost/operators.hpp",
    9... etc
    

    (and another forwarding header to export signals2)


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: 2025-06-15 06:13 UTC

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