rpc: Replace boost::variant with std::variant for RPCArg.m_fallback #20736

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2012-rpcStdVariant changing 3 files +11 −10
  1. MarcoFalke commented at 1:24 PM on December 21, 2020: member

    Now that we can use std::variant from the vanilla standard library, drop the third-party boost variant dependency.

    Patch is split out from #20480. A step-by-step replacement is possible because we don't have our own Variant wrapper and the source code specifies boost::variant explicitly. I think a step-by-step replacement should be preferred, because it simplifies review.

  2. fanquake added the label Refactoring on Dec 21, 2020
  3. fanquake added the label RPC/REST/ZMQ on Dec 21, 2020
  4. MarcoFalke force-pushed on Dec 21, 2020
  5. MarcoFalke force-pushed on Dec 21, 2020
  6. DrahtBot commented at 2:34 AM on December 22, 2020: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #20480 (Replace boost::variant with std::variant by MarcoFalke)
    • #19288 (fuzz: Add fuzzing harness for TorController by practicalswift)
    • #19183 ([WIP DONOTMERGE] Replace boost with C++17 by MarcoFalke)

    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.

  7. practicalswift commented at 3:02 AM on December 22, 2020: contributor

    Concept ACK

  8. DrahtBot cross-referenced this on Dec 22, 2020 from issue Replace boost::variant with std::variant by MarcoFalke
  9. DrahtBot cross-referenced this on Dec 22, 2020 from issue fuzz: Add fuzzing harness for TorController by practicalswift
  10. DrahtBot cross-referenced this on Dec 22, 2020 from issue [WIP DONOTMERGE] Replace boost with C++17 (std::shared_mutex) by MarcoFalke
  11. in src/rpc/util.h:25 in fa82f00e62 outdated
      18 | @@ -19,6 +19,7 @@
      19 |  #include <util/check.h>
      20 |  
      21 |  #include <string>
      22 | +#include <variant>
      23 |  #include <vector>
      24 |  
      25 |  #include <boost/variant.hpp>
    


    Sjors commented at 2:25 PM on December 30, 2020:

    You can drop #include <boost/variant.hpp>.


    MarcoFalke commented at 2:09 PM on January 1, 2021:

    Thanks, fixed.

  12. Sjors changes_requested
  13. Sjors commented at 2:28 PM on December 30, 2020: member

    ACK fa82f00 modulo include

  14. fjahr commented at 1:08 PM on January 1, 2021: contributor

    ACK fa82f00 modulo include as @Sjors mentioned

    I had started working on the same change before I found this and ended up with almost the same changeset for this part of the variant usage code.

  15. rpc: Replace boost::variant with std::variant for RPCArg.m_fallback fa749fbea3
  16. MarcoFalke force-pushed on Jan 1, 2021
  17. fjahr commented at 2:41 PM on January 1, 2021: contributor

    re-ACK fa749fbea3cad64582f76f7a58cfcc0d91a97326

  18. Sjors commented at 7:11 PM on January 1, 2021: member

    re-ACK fa749fbea3cad64582f76f7a58cfcc0d91a97326

  19. MarcoFalke merged this on Jan 4, 2021
  20. MarcoFalke closed this on Jan 4, 2021

  21. MarcoFalke deleted the branch on Jan 4, 2021
  22. sidhujag referenced this in commit 2e6fb6f50e on Jan 4, 2021
  23. ryanofsky cross-referenced this on Jan 29, 2021 from issue Multiprocess bitcoin by ryanofsky
  24. bitcoin locked this on Aug 16, 2022

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-20 06:54 UTC