Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treewide: misc fixes for libc++ 19 #2649

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/seastar/core/sstring.hh
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ public:
}
}
int compare(std::basic_string_view<char_type, traits_type> 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;
}
Expand All @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions include/seastar/net/toeplitz.hh
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@

#ifndef SEASTAR_MODULE
#include <cstdint>
#include <string_view>
#include <span>
#include <vector>
#endif

namespace seastar {

using rss_key_type = std::basic_string_view<uint8_t>;
using rss_key_type = std::span<const uint8_t>;

// Mellanox Linux's driver key
static constexpr uint8_t default_rsskey_40bytes_v[] = {
Expand Down
2 changes: 1 addition & 1 deletion src/util/log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down