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:
MarcoFalke
2024-12-17 19:55:45 +01:00
parent aa68ed27b8
commit fa720b94be
8 changed files with 14 additions and 14 deletions

View File

@@ -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);