refactor: Use std::span over Span #29119

pull maflcko wants to merge 2 commits into bitcoin:master from maflcko:2312-std-span- changing 16 files +52 −183
  1. maflcko commented at 11:36 pm on December 19, 2023: member

    std::span allows static extents, which is a nice benefit over just Span.

    However, the interface of the two isn’t identical and requires some more changes than just defining an alias. This is my current draft to compile with std::span. This should be the minimal changes required to get a green CI, but the changes may not be ideal, so this remains a draft.

    Also, this requires and is based on #29071.

    In the meantime, changes that make sense on their own, can be split up.

  2. DrahtBot commented at 11:36 pm on December 19, 2023: 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/29119.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept ACK jonatack

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

    Conflicts

    No conflicts as of last run.

  3. DrahtBot added the label Refactoring on Dec 19, 2023
  4. DrahtBot added the label CI failed on Dec 20, 2023
  5. in src/span.h:13 in 1745cf8118 outdated
     7@@ -8,7 +8,9 @@
     8 #include <algorithm>
     9 #include <cassert>
    10 #include <cstddef>
    11+#include <span>
    12 #include <type_traits>
    13+#include <span>
    


    obrusvit commented at 11:08 pm on December 20, 2023:
    double include
  6. DrahtBot added the label Needs rebase on Dec 21, 2023
  7. maflcko force-pushed on Dec 22, 2023
  8. DrahtBot removed the label Needs rebase on Dec 22, 2023
  9. maflcko force-pushed on Jan 3, 2024
  10. maflcko force-pushed on Jan 12, 2024
  11. maflcko force-pushed on Jan 18, 2024
  12. DrahtBot added the label Needs rebase on Feb 1, 2024
  13. maflcko force-pushed on Feb 1, 2024
  14. maflcko force-pushed on Feb 1, 2024
  15. DrahtBot removed the label Needs rebase on Feb 1, 2024
  16. maflcko force-pushed on Feb 2, 2024
  17. DrahtBot added the label Needs rebase on Feb 26, 2024
  18. maflcko force-pushed on Jun 5, 2024
  19. DrahtBot removed the label Needs rebase on Jun 5, 2024
  20. maflcko force-pushed on Jun 10, 2024
  21. DrahtBot added the label Needs rebase on Jun 12, 2024
  22. maflcko force-pushed on Jul 19, 2024
  23. DrahtBot removed the label Needs rebase on Jul 19, 2024
  24. DrahtBot added the label Needs rebase on Aug 28, 2024
  25. jonatack commented at 8:01 pm on August 28, 2024: member
    Concept ACK, provided we’re migrating to std::span.
  26. maflcko force-pushed on Aug 30, 2024
  27. maflcko commented at 8:34 am on August 30, 2024: member
  28. maflcko force-pushed on Aug 30, 2024
  29. DrahtBot removed the label Needs rebase on Aug 30, 2024
  30. maflcko force-pushed on Sep 2, 2024
  31. maflcko force-pushed on Sep 2, 2024
  32. refactor: Avoid needless, unsafe c-style cast b50a210268
  33. std::span WIP NOMERGE 6e1b4b1a77
  34. maflcko force-pushed on Oct 10, 2024
  35. maflcko commented at 9:58 pm on December 17, 2024: member

    This is my current draft to compile with std::span.

    Now that it was show that it is possible to compile all code with std::span, I went ahead and created a scripted-diff in https://github.com/bitcoin/bitcoin/pull/31519

  36. maflcko closed this on Dec 17, 2024

  37. maflcko deleted the branch on Dec 19, 2024

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: 2024-12-22 00:12 UTC

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