refactor: Use std::span over Span #29119

pull maflcko wants to merge 4 commits into bitcoin:master from maflcko:2312-std-span- changing 37 files +132 −252
  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

    For detailed information about the code coverage, see the test coverage report.

    Reviews

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #30263 (build: Bump clang minimum supported version to 16 by maflcko)
    • #30219 (Lint: Support running individual lint checks by davidgumberg)
    • #29965 (Lint: support running individual rust linters and improve subtree exclusion by davidgumberg)
    • #29847 (test: add a few more base32/64 calculation corner cases by paplorinc)
    • #26593 (tracing: Only prepare tracepoint arguments when actually tracing by 0xB10C)

    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.

  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. refactor: Remove Span operator==, Use std::ranges::equal d27397b09f
  21. bla 7156ebc9a8
  22. refactor: Avoid needless, unsafe c-style cast 02f23cb741
  23. std::span WIP NOMERGE 1b472701fb
  24. maflcko force-pushed on Jun 10, 2024
  25. DrahtBot added the label Needs rebase on Jun 12, 2024
  26. DrahtBot commented at 10:37 pm on June 12, 2024: contributor

    🐙 This pull request conflicts with the target branch and needs rebase.


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-06-29 07:13 UTC

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