mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-20 19:58:57 +02:00
refactor: Return std::span from MakeByteSpan
In theory this commit should only touch the span.h header, because std::span can implicilty convert into Span in most places, if needed. However, at least when using the clang compiler, there are some false-positive lifetimebound warnings and some implicit conversions can not be resolved. Thus, this refactoring commit also changed the affected places to replace Span with std::span.
This commit is contained in:
@@ -243,7 +243,7 @@ BOOST_AUTO_TEST_CASE(util_HexStr)
|
||||
constexpr std::string_view out_exp{"04678afdb0"};
|
||||
constexpr std::span in_s{HEX_PARSE_OUTPUT, out_exp.size() / 2};
|
||||
const Span<const uint8_t> in_u{MakeUCharSpan(in_s)};
|
||||
const Span<const std::byte> in_b{MakeByteSpan(in_s)};
|
||||
const std::span<const std::byte> in_b{MakeByteSpan(in_s)};
|
||||
|
||||
BOOST_CHECK_EQUAL(HexStr(in_u), out_exp);
|
||||
BOOST_CHECK_EQUAL(HexStr(in_s), out_exp);
|
||||
|
||||
Reference in New Issue
Block a user