diff --git a/tests/daemon/fw/multicast-strategy.t.cpp b/tests/daemon/fw/multicast-strategy.t.cpp
index aa18cdf..55254da 100644
--- a/tests/daemon/fw/multicast-strategy.t.cpp
+++ b/tests/daemon/fw/multicast-strategy.t.cpp
@@ -32,6 +32,8 @@
 #include "strategy-tester.hpp"
 #include "topology-tester.hpp"
 
+#include <boost/mp11/list.hpp>
+
 namespace nfd::tests {
 
 using MulticastStrategyTester = StrategyTester<fw::MulticastStrategy>;
@@ -470,7 +472,7 @@
   }
 };
 
-using Tests = boost::mpl::vector<
+using Tests = boost::mp11::mp_list<
   BasicNonLocal,
   NewFibLocal,
   InFaceLocal,
diff --git a/tests/daemon/fw/strategy-ad-hoc-face.t.cpp b/tests/daemon/fw/strategy-ad-hoc-face.t.cpp
index cd46054..ebd2623 100644
--- a/tests/daemon/fw/strategy-ad-hoc-face.t.cpp
+++ b/tests/daemon/fw/strategy-ad-hoc-face.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -37,7 +37,7 @@
 #include "tests/daemon/global-io-fixture.hpp"
 #include "topology-tester.hpp"
 
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace nfd::tests {
 
@@ -86,7 +86,7 @@
 BOOST_AUTO_TEST_SUITE(Fw)
 BOOST_AUTO_TEST_SUITE(TestStrategyAdHocFace)
 
-using Strategies = boost::mpl::vector<
+using Strategies = boost::mp11::mp_list<
   AsfStrategy,
   BestRouteStrategy,
   MulticastStrategy,
diff --git a/tests/daemon/fw/strategy-broadcast-medium.t.cpp b/tests/daemon/fw/strategy-broadcast-medium.t.cpp
index 113faf5..e8e5acb 100644
--- a/tests/daemon/fw/strategy-broadcast-medium.t.cpp
+++ b/tests/daemon/fw/strategy-broadcast-medium.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -38,7 +38,7 @@
 #include "tests/daemon/global-io-fixture.hpp"
 #include "topology-tester.hpp"
 
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace nfd::tests {
 
@@ -89,7 +89,7 @@
 BOOST_AUTO_TEST_SUITE(Fw)
 BOOST_AUTO_TEST_SUITE(TestStrategyBroadcastMedium)
 
-using Strategies = boost::mpl::vector<
+using Strategies = boost::mp11::mp_list<
   AsfStrategy,
   BestRouteStrategy,
   MulticastStrategy,
diff --git a/tests/daemon/fw/strategy-instantiation.t.cpp b/tests/daemon/fw/strategy-instantiation.t.cpp
index 0ac730c..ca59f3e 100644
--- a/tests/daemon/fw/strategy-instantiation.t.cpp
+++ b/tests/daemon/fw/strategy-instantiation.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2023,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -37,7 +37,7 @@
 
 #include "tests/test-common.hpp"
 
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace nfd::tests {
 
@@ -46,23 +46,12 @@
 BOOST_AUTO_TEST_SUITE(Fw)
 BOOST_AUTO_TEST_SUITE(TestStrategyInstantiation)
 
-template<typename S, bool CanAcceptParameters, uint64_t MinVersion>
-class Test
+template<typename S, bool CanAcceptParams, uint64_t MinVer>
+struct Test
 {
-public:
   using Strategy = S;
-
-  static bool
-  canAcceptParameters()
-  {
-    return CanAcceptParameters;
-  }
-
-  static uint64_t
-  getMinVersion()
-  {
-    return MinVersion;
-  }
+  static constexpr bool canAcceptParameters = CanAcceptParams;
+  static constexpr uint64_t minVersion = MinVer;
 
   static Name
   getVersionedStrategyName(uint64_t version)
@@ -71,7 +60,7 @@
   }
 };
 
-using Tests = boost::mpl::vector<
+using Tests = boost::mp11::mp_list<
   Test<AccessStrategy, false, 1>,
   Test<AsfStrategy, true, 4>,
   Test<BestRouteStrategy, true, 5>,
@@ -89,26 +78,25 @@
 {
   BOOST_REQUIRE(T::Strategy::getStrategyName().at(-1).isVersion());
   uint64_t maxVersion = T::Strategy::getStrategyName().at(-1).toVersion();
-  BOOST_REQUIRE_LE(T::getMinVersion(), maxVersion);
+  BOOST_REQUIRE_LE(T::minVersion, maxVersion);
 
   FaceTable faceTable;
   Forwarder forwarder(faceTable);
-  for (uint64_t version = T::getMinVersion(); version <= maxVersion; ++version) {
+  for (auto version = T::minVersion; version <= maxVersion; ++version) {
     Name versionedName = T::getVersionedStrategyName(version);
-    unique_ptr<typename T::Strategy> instance;
-    BOOST_CHECK_NO_THROW(instance = make_unique<typename T::Strategy>(forwarder, versionedName));
+    auto instance = make_unique<typename T::Strategy>(forwarder, versionedName);
     BOOST_CHECK_EQUAL(instance->getInstanceName(), versionedName);
 
-    if (!T::canAcceptParameters()) {
+    if (!T::canAcceptParameters) {
       Name nameWithParameters = Name(versionedName).append("param");
       BOOST_CHECK_THROW(typename T::Strategy(forwarder, nameWithParameters), std::invalid_argument);
     }
   }
 
-  if (T::getMinVersion() > 0) {
+  if (T::minVersion > 0) {
     Name version0Name = T::getVersionedStrategyName(0);
     BOOST_CHECK_THROW(typename T::Strategy(forwarder, version0Name), std::invalid_argument);
-    Name earlyVersionName = T::getVersionedStrategyName(T::getMinVersion() - 1);
+    Name earlyVersionName = T::getVersionedStrategyName(T::minVersion - 1);
     BOOST_CHECK_THROW(typename T::Strategy(forwarder, earlyVersionName), std::invalid_argument);
   }
 
@@ -145,7 +133,7 @@
   Forwarder m_forwarder{m_faceTable};
 };
 
-using StrategiesWithRetxSuppressionExponential = boost::mpl::vector<
+using StrategiesWithRetxSuppressionExponential = boost::mp11::mp_list<
   AsfStrategy,
   BestRouteStrategy,
   MulticastStrategy
diff --git a/tests/daemon/fw/strategy-nack-return.t.cpp b/tests/daemon/fw/strategy-nack-return.t.cpp
index 4b6961d..e7ed117 100644
--- a/tests/daemon/fw/strategy-nack-return.t.cpp
+++ b/tests/daemon/fw/strategy-nack-return.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -35,7 +35,7 @@
 #include "topology-tester.hpp"
 #include "tests/daemon/face/dummy-face.hpp"
 
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace nfd::tests {
 
@@ -83,7 +83,7 @@
 BOOST_AUTO_TEST_SUITE(Fw)
 BOOST_AUTO_TEST_SUITE(TestStrategyNackReturn)
 
-using Strategies = boost::mpl::vector<
+using Strategies = boost::mp11::mp_list<
   BestRouteStrategy,
   RandomStrategy
 >;
@@ -282,7 +282,7 @@
   static constexpr lp::NackReason expectedResult{R};
 };
 
-using NackReasonCombinations = boost::mpl::vector<
+using NackReasonCombinations = boost::mp11::mp_list<
   NackReasonCombination<lp::NackReason::CONGESTION, lp::NackReason::CONGESTION, lp::NackReason::CONGESTION>,
   NackReasonCombination<lp::NackReason::CONGESTION, lp::NackReason::DUPLICATE, lp::NackReason::CONGESTION>,
   NackReasonCombination<lp::NackReason::CONGESTION, lp::NackReason::NO_ROUTE, lp::NackReason::CONGESTION>,
diff --git a/tests/daemon/fw/strategy-no-route.t.cpp b/tests/daemon/fw/strategy-no-route.t.cpp
index 3dfce2c..2e70e0e 100644
--- a/tests/daemon/fw/strategy-no-route.t.cpp
+++ b/tests/daemon/fw/strategy-no-route.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -39,7 +39,7 @@
 #include "choose-strategy.hpp"
 #include "strategy-tester.hpp"
 
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace nfd::tests {
 
@@ -78,25 +78,16 @@
 BOOST_AUTO_TEST_SUITE(Fw)
 BOOST_AUTO_TEST_SUITE(TestStrategyNoRoute)
 
-template<typename S, typename C>
-class Test
-{
-public:
-  using Strategy = S;
-  using Case = C;
-};
-
 template<typename S>
-class EmptyNextHopList
+struct EmptyNextHopList
 {
-public:
-  Name
+  static Name
   getInterestName()
   {
     return "/P";
   }
 
-  void
+  static void
   insertFibEntry(StrategyNoRouteFixture<S>* fixture)
   {
     fixture->fib.insert(Name());
@@ -104,16 +95,15 @@
 };
 
 template<typename S>
-class NextHopIsDownstream
+struct NextHopIsDownstream
 {
-public:
-  Name
+  static Name
   getInterestName()
   {
     return "/P";
   }
 
-  void
+  static void
   insertFibEntry(StrategyNoRouteFixture<S>* fixture)
   {
     fib::Entry* entry = fixture->fib.insert(Name()).first;
@@ -122,16 +112,15 @@
 };
 
 template<typename S>
-class NextHopViolatesScope
+struct NextHopViolatesScope
 {
-public:
-  Name
+  static Name
   getInterestName()
   {
     return "/localhop/P";
   }
 
-  void
+  static void
   insertFibEntry(StrategyNoRouteFixture<S>* fixture)
   {
     fib::Entry* entry = fixture->fib.insert("/localhop").first;
@@ -140,27 +129,27 @@
   }
 };
 
-using Tests = boost::mpl::vector<
-  Test<AsfStrategy, EmptyNextHopList<AsfStrategy>>,
-  Test<AsfStrategy, NextHopIsDownstream<AsfStrategy>>,
-  Test<AsfStrategy, NextHopViolatesScope<AsfStrategy>>,
+using Tests = boost::mp11::mp_list<
+  boost::mp11::mp_list<AsfStrategy, EmptyNextHopList<AsfStrategy>>,
+  boost::mp11::mp_list<AsfStrategy, NextHopIsDownstream<AsfStrategy>>,
+  boost::mp11::mp_list<AsfStrategy, NextHopViolatesScope<AsfStrategy>>,
 
-  Test<BestRouteStrategy, EmptyNextHopList<BestRouteStrategy>>,
-  Test<BestRouteStrategy, NextHopIsDownstream<BestRouteStrategy>>,
-  Test<BestRouteStrategy, NextHopViolatesScope<BestRouteStrategy>>,
+  boost::mp11::mp_list<BestRouteStrategy, EmptyNextHopList<BestRouteStrategy>>,
+  boost::mp11::mp_list<BestRouteStrategy, NextHopIsDownstream<BestRouteStrategy>>,
+  boost::mp11::mp_list<BestRouteStrategy, NextHopViolatesScope<BestRouteStrategy>>,
 
-  Test<RandomStrategy, EmptyNextHopList<RandomStrategy>>,
-  Test<RandomStrategy, NextHopIsDownstream<RandomStrategy>>,
-  Test<RandomStrategy, NextHopViolatesScope<RandomStrategy>>
+  boost::mp11::mp_list<RandomStrategy, EmptyNextHopList<RandomStrategy>>,
+  boost::mp11::mp_list<RandomStrategy, NextHopIsDownstream<RandomStrategy>>,
+  boost::mp11::mp_list<RandomStrategy, NextHopViolatesScope<RandomStrategy>>
 >;
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(IncomingInterest,
-                                 T, Tests, StrategyNoRouteFixture<typename T::Strategy>)
+                                 T, Tests, StrategyNoRouteFixture<boost::mp11::mp_first<T>>)
 {
-  typename T::Case scenario;
-  scenario.insertFibEntry(this);
+  using Scenario = boost::mp11::mp_second<T>;
+  Scenario::insertFibEntry(this);
 
-  auto interest = makeInterest(scenario.getInterestName());
+  auto interest = makeInterest(Scenario::getInterestName());
   auto pitEntry = this->pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*this->face1, *interest);
 
diff --git a/tests/daemon/fw/strategy-scope-control.t.cpp b/tests/daemon/fw/strategy-scope-control.t.cpp
index 392becb..8bd96d1 100644
--- a/tests/daemon/fw/strategy-scope-control.t.cpp
+++ b/tests/daemon/fw/strategy-scope-control.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -39,7 +39,7 @@
 #include "choose-strategy.hpp"
 #include "strategy-tester.hpp"
 
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace nfd::tests {
 
@@ -85,31 +85,15 @@
 BOOST_AUTO_TEST_SUITE(TestStrategyScopeControl)
 
 template<typename S, bool WillSendNackNoRoute, bool CanProcessNack, bool WillRejectPitEntry>
-class Test
+struct Test
 {
-public:
   using Strategy = S;
-
-  static bool
-  willRejectPitEntry()
-  {
-    return WillRejectPitEntry;
-  }
-
-  static bool
-  willSendNackNoRoute()
-  {
-    return WillSendNackNoRoute;
-  }
-
-  static bool
-  canProcessNack()
-  {
-    return CanProcessNack;
-  }
+  static constexpr bool canProcessNack = CanProcessNack;
+  static constexpr bool willRejectPitEntry = WillRejectPitEntry;
+  static constexpr bool willSendNackNoRoute = WillSendNackNoRoute;
 };
 
-using Tests = boost::mpl::vector<
+using Tests = boost::mp11::mp_list<
   Test<AccessStrategy, false, false, true>,
   Test<AsfStrategy, true, false, true>,
   Test<BestRouteStrategy, true, true, true>,
@@ -148,11 +132,11 @@
 
   BOOST_REQUIRE(this->strategy.waitForAction(
     [&] { this->strategy.afterReceiveInterest(*interest, FaceEndpoint(*this->localFace3), pitEntry); },
-    this->limitedIo, T::willRejectPitEntry() + T::willSendNackNoRoute()));
+    this->limitedIo, T::willRejectPitEntry + T::willSendNackNoRoute));
 
   BOOST_CHECK_EQUAL(this->strategy.sendInterestHistory.size(), 0);
-  BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), T::willRejectPitEntry());
-  if (T::willSendNackNoRoute()) {
+  BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), T::willRejectPitEntry);
+  if (T::willSendNackNoRoute) {
     BOOST_REQUIRE_EQUAL(this->strategy.sendNackHistory.size(), 1);
     BOOST_CHECK_EQUAL(this->strategy.sendNackHistory.back().header.getReason(), lp::NackReason::NO_ROUTE);
   }
@@ -191,11 +175,11 @@
 
   BOOST_REQUIRE(this->strategy.waitForAction(
     [&] { this->strategy.afterReceiveInterest(*interest, FaceEndpoint(*this->nonLocalFace1), pitEntry); },
-    this->limitedIo, T::willRejectPitEntry() + T::willSendNackNoRoute()));
+    this->limitedIo, T::willRejectPitEntry + T::willSendNackNoRoute));
 
   BOOST_CHECK_EQUAL(this->strategy.sendInterestHistory.size(), 0);
-  BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), T::willRejectPitEntry());
-  if (T::willSendNackNoRoute()) {
+  BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), T::willRejectPitEntry);
+  if (T::willSendNackNoRoute) {
     BOOST_REQUIRE_EQUAL(this->strategy.sendNackHistory.size(), 1);
     BOOST_CHECK_EQUAL(this->strategy.sendNackHistory.back().header.getReason(), lp::NackReason::NO_ROUTE);
   }
@@ -237,11 +221,11 @@
 
   BOOST_REQUIRE(this->strategy.waitForAction(
     [&] { this->strategy.afterReceiveNack(nack, FaceEndpoint(*this->localFace4), pitEntry); },
-    this->limitedIo, T::canProcessNack()));
+    this->limitedIo, T::canProcessNack));
 
   BOOST_CHECK_EQUAL(this->strategy.sendInterestHistory.size(), 0);
   BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), 0);
-  if (T::canProcessNack()) {
+  if (T::canProcessNack) {
     BOOST_REQUIRE_EQUAL(this->strategy.sendNackHistory.size(), 1);
     BOOST_CHECK_EQUAL(this->strategy.sendNackHistory.back().header.getReason(), lp::NackReason::NO_ROUTE);
   }
@@ -262,11 +246,11 @@
 
   BOOST_REQUIRE(this->strategy.waitForAction(
     [&] { this->strategy.afterReceiveNack(nack, FaceEndpoint(*this->localFace4), pitEntry); },
-    this->limitedIo, T::canProcessNack()));
+    this->limitedIo, T::canProcessNack));
 
   BOOST_CHECK_EQUAL(this->strategy.sendInterestHistory.size(), 0);
   BOOST_CHECK_EQUAL(this->strategy.rejectPendingInterestHistory.size(), 0);
-  if (T::canProcessNack()) {
+  if (T::canProcessNack) {
     BOOST_REQUIRE_EQUAL(this->strategy.sendNackHistory.size(), 1);
     BOOST_CHECK_EQUAL(this->strategy.sendNackHistory.back().header.getReason(), lp::NackReason::NO_ROUTE);
   }
diff --git a/tests/daemon/fw/unsolicited-data-policy.t.cpp b/tests/daemon/fw/unsolicited-data-policy.t.cpp
index 67be5b2..c4a7097 100644
--- a/tests/daemon/fw/unsolicited-data-policy.t.cpp
+++ b/tests/daemon/fw/unsolicited-data-policy.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -31,7 +31,7 @@
 #include "tests/daemon/face/dummy-face.hpp"
 
 #include <boost/logic/tribool.hpp>
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace nfd::tests {
 
@@ -40,7 +40,8 @@
 class UnsolicitedDataPolicyFixture : public GlobalIoTimeFixture
 {
 protected:
-  /** \tparam Policy policy type, or void to keep default policy
+  /**
+   * \tparam Policy The policy type, or `void` to keep the default policy.
    */
   template<typename Policy>
   void
@@ -89,15 +90,15 @@
   BOOST_CHECK_EQUAL(policyNames.count("admit-all"), 1);
 }
 
-template<typename Policy, bool shouldAdmitLocal, bool shouldAdmitNonLocal>
+template<typename P, bool Local, bool NonLocal>
 struct FaceScopePolicyTest
 {
-  using PolicyType = Policy;
-  using ShouldAdmitLocal = std::bool_constant<shouldAdmitLocal>;
-  using ShouldAdmitNonLocal = std::bool_constant<shouldAdmitNonLocal>;
+  using PolicyType = P;
+  static constexpr bool shouldAdmitLocal = Local;
+  static constexpr bool shouldAdmitNonLocal = NonLocal;
 };
 
-using FaceScopePolicyTests = boost::mpl::vector<
+using FaceScopePolicyTests = boost::mp11::mp_list<
   FaceScopePolicyTest<void, false, false>, // default policy
   FaceScopePolicyTest<DropAllUnsolicitedDataPolicy, false, false>,
   FaceScopePolicyTest<AdmitLocalUnsolicitedDataPolicy, true, false>,
@@ -115,7 +116,7 @@
 
   auto data1 = makeData("/unsolicited-from-local");
   forwarder.onIncomingData(*data1, FaceEndpoint(*face1));
-  BOOST_CHECK_EQUAL(isInCs(*data1), T::ShouldAdmitLocal::value);
+  BOOST_CHECK_EQUAL(isInCs(*data1), T::shouldAdmitLocal);
 
   auto face2 = make_shared<DummyFace>("dummy://", "dummy://",
                                       ndn::nfd::FACE_SCOPE_NON_LOCAL);
@@ -123,7 +124,7 @@
 
   auto data2 = makeData("/unsolicited-from-non-local");
   forwarder.onIncomingData(*data2, FaceEndpoint(*face2));
-  BOOST_CHECK_EQUAL(isInCs(*data2), T::ShouldAdmitNonLocal::value);
+  BOOST_CHECK_EQUAL(isInCs(*data2), T::shouldAdmitNonLocal);
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestUnsolicitedDataPolicy
