Skip to content

Commit

Permalink
Connection: use AsBytes() to work around libc++ bug
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Jan 12, 2024
1 parent 4d015dd commit 40f3771
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Connection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ QmqpRelayConnection::OnConnect(FileDescriptor out_fd, FileDescriptor in_fd)
auto &mail = CastMail(L, outgoing_mail);

std::list<std::span<const std::byte>> request;
request.push_back(std::as_bytes(std::span{mail.message}));
request.push_back(AsBytes(mail.message));

if (peer_cred.pid >= 0) {
char *end = fmt::format_to(received_buffer,
Expand All @@ -195,8 +195,8 @@ QmqpRelayConnection::OnConnect(FileDescriptor out_fd, FileDescriptor in_fd)

generator(request, true);
request.emplace_back(std::as_bytes(std::span{sender_header(mail.sender.size())}));
request.emplace_back(std::as_bytes(std::span{mail.sender}));
request.push_back(std::as_bytes(std::span{mail.tail}));
request.push_back(AsBytes(mail.sender));
request.push_back(AsBytes(mail.tail));

client.Request(out_fd, in_fd, std::move(request));
}
Expand Down

0 comments on commit 40f3771

Please sign in to comment.