build: require boost >= 1.71.0
Refs: #5276
Change-Id: I287a52dab0212d1ce0da77afb563554214cac68a
diff --git a/tests/unit-tests/dummy-forwarder.cpp b/tests/unit-tests/dummy-forwarder.cpp
index 2bcc3bc..ca43032 100644
--- a/tests/unit-tests/dummy-forwarder.cpp
+++ b/tests/unit-tests/dummy-forwarder.cpp
@@ -19,12 +19,13 @@
#include "dummy-forwarder.hpp"
-#include <boost/asio/io_service.hpp>
+#include <boost/asio/io_context.hpp>
+#include <boost/asio/post.hpp>
namespace ndn {
namespace chronosync {
-DummyForwarder::DummyForwarder(boost::asio::io_service& io, KeyChain& keyChain)
+DummyForwarder::DummyForwarder(boost::asio::io_context& io, KeyChain& keyChain)
: m_io(io)
, m_keyChain(keyChain)
{
@@ -42,7 +43,7 @@
if (self == &*otherFace) {
continue;
}
- m_io.post([=] { otherFace->receive(i); });
+ boost::asio::post(m_io, [=] { otherFace->receive(i); });
}
});
@@ -52,7 +53,7 @@
if (self == &*otherFace) {
continue;
}
- m_io.post([=] { otherFace->receive(d); });
+ boost::asio::post(m_io, [=] { otherFace->receive(d); });
}
});
@@ -62,7 +63,7 @@
if (self == &*otherFace) {
continue;
}
- m_io.post([=] { otherFace->receive(n); });
+ boost::asio::post(m_io, [=] { otherFace->receive(n); });
}
});
diff --git a/tests/unit-tests/dummy-forwarder.hpp b/tests/unit-tests/dummy-forwarder.hpp
index 60e6904..372186e 100644
--- a/tests/unit-tests/dummy-forwarder.hpp
+++ b/tests/unit-tests/dummy-forwarder.hpp
@@ -38,7 +38,7 @@
class DummyForwarder
{
public:
- DummyForwarder(boost::asio::io_service& io, KeyChain& keyChain);
+ DummyForwarder(boost::asio::io_context& io, KeyChain& keyChain);
Face&
addFace();
@@ -53,7 +53,7 @@
removeFaces();
private:
- boost::asio::io_service& m_io;
+ boost::asio::io_context& m_io;
KeyChain& m_keyChain;
std::vector<std::shared_ptr<DummyClientFace>> m_faces;
};
diff --git a/tests/unit-tests/test-logic.cpp b/tests/unit-tests/test-logic.cpp
index 1a1257a..3cd7f9d 100644
--- a/tests/unit-tests/test-logic.cpp
+++ b/tests/unit-tests/test-logic.cpp
@@ -363,7 +363,7 @@
systemClock->advance(ndn::time::hours(1));
BOOST_CHECK_EQUAL(io.poll(), 0); // no delayed handlers are expected
- BOOST_CHECK_EQUAL(io.stopped(), true); // io_service expected to be stopped
+ BOOST_CHECK_EQUAL(io.stopped(), true); // io_context expected to be stopped
}
BOOST_FIXTURE_TEST_CASE(TrimState, ndn::tests::IdentityManagementTimeFixture)
diff --git a/tests/unit-tests/test-multiple-user.cpp b/tests/unit-tests/test-multiple-user.cpp
index b8a5dbd..83d00da 100644
--- a/tests/unit-tests/test-multiple-user.cpp
+++ b/tests/unit-tests/test-multiple-user.cpp
@@ -1,6 +1,6 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
/*
- * Copyright (c) 2012-2022 University of California, Los Angeles
+ * Copyright (c) 2012-2023 University of California, Los Angeles
*
* This file is part of ChronoSync, synchronization library for distributed realtime
* applications for NDN.
@@ -72,7 +72,7 @@
Name syncPrefix;
Name userPrefix[3];
- boost::asio::io_service io;
+ boost::asio::io_context io;
shared_ptr<ndn::Face> face;
ndn::Scheduler scheduler;
shared_ptr<Handler> handler;