From 08c2fbb18df66fd012b110013a56174f369d6c6e Mon Sep 17 00:00:00 2001 From: Davide Pesavento Date: Sun, 9 Jun 2024 16:40:28 -0400 Subject: [PATCH] face: fix compilation with clang 7 Change-Id: Ic07ee2405d53107a089ec2b53ef3c8bed105dd01 --- daemon/face/datagram-transport.hpp | 2 +- daemon/face/stream-transport.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/face/datagram-transport.hpp b/daemon/face/datagram-transport.hpp index 0dcf0e1f..923dde33 100644 --- a/daemon/face/datagram-transport.hpp +++ b/daemon/face/datagram-transport.hpp @@ -202,7 +202,7 @@ template void DatagramTransport::handleReceive(const boost::system::error_code& error, size_t nBytesReceived) { - receiveDatagram(ndn::span(m_receiveBuffer).first(nBytesReceived), error); + receiveDatagram(ndn::make_span(m_receiveBuffer).first(nBytesReceived), error); if (m_socket.is_open()) m_socket.async_receive_from(boost::asio::buffer(m_receiveBuffer), m_sender, diff --git a/daemon/face/stream-transport.hpp b/daemon/face/stream-transport.hpp index 750432f1..acc92e0b 100644 --- a/daemon/face/stream-transport.hpp +++ b/daemon/face/stream-transport.hpp @@ -247,7 +247,7 @@ StreamTransport::handleReceive(const boost::system::error_code& error, NFD_LOG_FACE_TRACE("Received: " << nBytesReceived << " bytes"); m_receiveBufferSize += nBytesReceived; - auto unparsedBytes = ndn::span(m_receiveBuffer).first(m_receiveBufferSize); + auto unparsedBytes = ndn::make_span(m_receiveBuffer).first(m_receiveBufferSize); while (!unparsedBytes.empty()) { auto [isOk, element] = Block::fromBuffer(unparsedBytes); if (!isOk)