diff --git a/include/seastar/core/sstring.hh b/include/seastar/core/sstring.hh index 42a09dfe6f..5cef7ba709 100644 --- a/include/seastar/core/sstring.hh +++ b/include/seastar/core/sstring.hh @@ -565,7 +565,7 @@ public: } } int compare(std::basic_string_view x) const noexcept { - auto n = traits_type::compare(begin(), x.begin(), std::min(size(), x.size())); + auto n = traits_type::compare(begin(), x.data(), std::min(size(), x.size())); if (n != 0) { return n; } @@ -584,7 +584,7 @@ public: } sz = std::min(size() - pos, sz); - auto n = traits_type::compare(begin() + pos, x.begin(), std::min(sz, x.size())); + auto n = traits_type::compare(begin() + pos, x.data(), std::min(sz, x.size())); if (n != 0) { return n; } diff --git a/include/seastar/net/toeplitz.hh b/include/seastar/net/toeplitz.hh index 93fdfca4d3..b34d423ff8 100644 --- a/include/seastar/net/toeplitz.hh +++ b/include/seastar/net/toeplitz.hh @@ -45,13 +45,13 @@ #ifndef SEASTAR_MODULE #include -#include +#include #include #endif namespace seastar { -using rss_key_type = std::basic_string_view; +using rss_key_type = std::span; // Mellanox Linux's driver key static constexpr uint8_t default_rsskey_40bytes_v[] = { diff --git a/src/util/log.cc b/src/util/log.cc index 896eb48b0c..d60f1a84b2 100644 --- a/src/util/log.cc +++ b/src/util/log.cc @@ -157,7 +157,7 @@ void log_buf::realloc_buffer_and_append(char c) noexcept { _alloc_failure = true; std::string_view msg = "(log buffer allocation failure)"; auto can_copy = std::min(msg.size(), size_t(_current - _begin)); - std::memcpy(_current - can_copy, msg.begin(), can_copy); + std::memcpy(_current - can_copy, msg.data(), can_copy); } }