Replace Boost.MPL with Mp11

Change-Id: I9e0f3cd0169a733f602ff5fc1457f63d6499387d
diff --git a/ndn-cxx/impl/face-impl.hpp b/ndn-cxx/impl/face-impl.hpp
index df1fabd..2b08d5e 100644
--- a/ndn-cxx/impl/face-impl.hpp
+++ b/ndn-cxx/impl/face-impl.hpp
@@ -27,6 +27,7 @@
 #include "ndn-cxx/impl/lp-field-tag.hpp"
 #include "ndn-cxx/impl/pending-interest.hpp"
 #include "ndn-cxx/impl/registered-prefix.hpp"
+#include "ndn-cxx/lp/fields.hpp"
 #include "ndn-cxx/lp/packet.hpp"
 #include "ndn-cxx/lp/tags.hpp"
 #include "ndn-cxx/mgmt/nfd/command-options.hpp"
diff --git a/ndn-cxx/lp/fields.hpp b/ndn-cxx/lp/fields.hpp
index d30ba1f..37cbec4 100644
--- a/ndn-cxx/lp/fields.hpp
+++ b/ndn-cxx/lp/fields.hpp
@@ -31,7 +31,8 @@
 #include "ndn-cxx/lp/sequence.hpp"
 #include "ndn-cxx/lp/tlv.hpp"
 
-#include <boost/mpl/set.hpp>
+#include <boost/mp11/list.hpp>
+#include <boost/mp11/set.hpp>
 
 namespace ndn::lp {
 
@@ -116,7 +117,7 @@
 /**
  * \brief Set of all field declarations.
  */
-using FieldSet = boost::mpl::set<
+using FieldSet = boost::mp11::mp_list<
   FragmentField,
   SequenceField,
   FragIndexField,
@@ -132,6 +133,7 @@
   NonDiscoveryField,
   PrefixAnnouncementField
 >;
+static_assert(boost::mp11::mp_is_set<FieldSet>());
 
 } // namespace ndn::lp
 
diff --git a/ndn-cxx/lp/packet.cpp b/ndn-cxx/lp/packet.cpp
index be115f9..3b87968 100644
--- a/ndn-cxx/lp/packet.cpp
+++ b/ndn-cxx/lp/packet.cpp
@@ -20,10 +20,9 @@
  */
 
 #include "ndn-cxx/lp/packet.hpp"
+#include "ndn-cxx/lp/fields.hpp"
 
-#include <boost/bind/bind.hpp>
-#include <boost/mpl/for_each.hpp>
-#include <boost/range/adaptor/reversed.hpp>
+#include <boost/mp11/algorithm.hpp>
 
 namespace ndn::lp {
 
@@ -54,28 +53,17 @@
   int8_t locationSortOrder = getLocationSortOrder<field_location_tags::Header>(); ///< sort order of field_location_tag
 };
 
-struct ExtractFieldInfo
-{
-  using result_type = void;
-
-  template<typename T>
-  constexpr void
-  operator()(FieldInfo* info, const T&) const noexcept
-  {
-    if (T::TlvType::value != info->tlvType) {
-      return;
-    }
-    info->isRecognized = true;
-    info->canIgnore = false;
-    info->isRepeatable = T::IsRepeatable::value;
-    info->locationSortOrder = getLocationSortOrder<typename T::FieldLocation>();
-  }
-};
-
 FieldInfo::FieldInfo(uint32_t type) noexcept
   : tlvType(type)
 {
-  boost::mpl::for_each<FieldSet>(boost::bind(ExtractFieldInfo(), this, _1));
+  boost::mp11::mp_for_each<FieldSet>([this] (auto fieldDecl) {
+    if (tlvType == decltype(fieldDecl)::TlvType::value) {
+      isRecognized = true;
+      isRepeatable = decltype(fieldDecl)::IsRepeatable::value;
+      locationSortOrder = getLocationSortOrder<typename decltype(fieldDecl)::FieldLocation>();
+    }
+  });
+
   if (!isRecognized) {
     canIgnore = tlv::HEADER3_MIN <= tlvType &&
                 tlvType <= tlv::HEADER3_MAX &&
diff --git a/ndn-cxx/lp/packet.hpp b/ndn-cxx/lp/packet.hpp
index 9f06555..a42780b 100644
--- a/ndn-cxx/lp/packet.hpp
+++ b/ndn-cxx/lp/packet.hpp
@@ -22,7 +22,9 @@
 #ifndef NDN_CXX_LP_PACKET_HPP
 #define NDN_CXX_LP_PACKET_HPP
 
-#include "ndn-cxx/lp/fields.hpp"
+#include "ndn-cxx/encoding/block.hpp"
+#include "ndn-cxx/encoding/encoding-buffer.hpp"
+#include "ndn-cxx/lp/tlv.hpp"
 
 /**
  * @brief Contains classes and functions related to NDNLPv2.
diff --git a/ndn-cxx/net/face-uri.cpp b/ndn-cxx/net/face-uri.cpp
index 93cbec4..b25f178 100644
--- a/ndn-cxx/net/face-uri.cpp
+++ b/ndn-cxx/net/face-uri.cpp
@@ -32,8 +32,9 @@
 #include <boost/algorithm/string/classification.hpp>
 #include <boost/algorithm/string/split.hpp>
 #include <boost/lexical_cast.hpp>
-#include <boost/mpl/for_each.hpp>
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/algorithm.hpp>
+#include <boost/mp11/list.hpp>
+#include <boost/mp11/set.hpp>
 
 #include <regex>
 #include <set>
@@ -550,25 +551,20 @@
   }
 };
 
-using CanonizeProviders = boost::mpl::vector<UdpCanonizeProvider*,
-                                             TcpCanonizeProvider*,
-                                             EtherCanonizeProvider*,
-                                             DevCanonizeProvider*,
-                                             UdpDevCanonizeProvider*>;
+using CanonizeProviders = boost::mp11::mp_list<UdpCanonizeProvider,
+                                               TcpCanonizeProvider,
+                                               EtherCanonizeProvider,
+                                               DevCanonizeProvider,
+                                               UdpDevCanonizeProvider>;
+static_assert(boost::mp11::mp_is_set<CanonizeProviders>());
+
 using CanonizeProviderTable = std::map<std::string, shared_ptr<CanonizeProvider>>;
 
-class CanonizeProviderTableInitializer
+struct CanonizeProviderTableInitializer
 {
-public:
-  explicit
-  CanonizeProviderTableInitializer(CanonizeProviderTable& providerTable)
-    : m_providerTable(providerTable)
-  {
-  }
-
   template<typename CP>
   void
-  operator()(CP*)
+  operator()(boost::mp11::mp_identity<CP>)
   {
     shared_ptr<CanonizeProvider> cp = make_shared<CP>();
     auto schemes = cp->getSchemes();
@@ -580,24 +576,23 @@
     }
   }
 
-private:
   CanonizeProviderTable& m_providerTable;
 };
 
 static const CanonizeProvider*
 getCanonizeProvider(const std::string& scheme)
 {
-  static CanonizeProviderTable providerTable;
-  if (providerTable.empty()) {
-    boost::mpl::for_each<CanonizeProviders>(CanonizeProviderTableInitializer(providerTable));
-    BOOST_ASSERT(!providerTable.empty());
-  }
+  static const auto providerTable = [] {
+    using namespace boost::mp11;
+    CanonizeProviderTable table;
+    mp_for_each<mp_transform<mp_identity, CanonizeProviders>>(CanonizeProviderTableInitializer{table});
+    return table;
+  }();
 
   auto it = providerTable.find(scheme);
   return it == providerTable.end() ? nullptr : it->second.get();
 }
 
-
 bool
 FaceUri::canCanonize(const std::string& scheme)
 {
@@ -607,7 +602,7 @@
 bool
 FaceUri::isCanonical() const
 {
-  const CanonizeProvider* cp = getCanonizeProvider(this->getScheme());
+  const auto* cp = getCanonizeProvider(getScheme());
   if (cp == nullptr) {
     return false;
   }
@@ -620,7 +615,7 @@
                   const CanonizeFailureCallback& onFailure,
                   boost::asio::io_context& io, time::nanoseconds timeout) const
 {
-  const CanonizeProvider* cp = getCanonizeProvider(this->getScheme());
+  const auto* cp = getCanonizeProvider(getScheme());
   if (cp == nullptr) {
     if (onFailure) {
       onFailure("scheme not supported");
diff --git a/ndn-cxx/util/dummy-client-face.cpp b/ndn-cxx/util/dummy-client-face.cpp
index 06981b9..b4dc341 100644
--- a/ndn-cxx/util/dummy-client-face.cpp
+++ b/ndn-cxx/util/dummy-client-face.cpp
@@ -22,6 +22,7 @@
 #include "ndn-cxx/util/dummy-client-face.hpp"
 
 #include "ndn-cxx/impl/lp-field-tag.hpp"
+#include "ndn-cxx/lp/fields.hpp"
 #include "ndn-cxx/lp/packet.hpp"
 #include "ndn-cxx/lp/tags.hpp"
 #include "ndn-cxx/mgmt/nfd/control-parameters.hpp"
diff --git a/tests/benchmarks/encoding-bench.cpp b/tests/benchmarks/encoding-bench.cpp
index 7694d89..4d7c96b 100644
--- a/tests/benchmarks/encoding-bench.cpp
+++ b/tests/benchmarks/encoding-bench.cpp
@@ -25,8 +25,7 @@
 #include "ndn-cxx/encoding/tlv.hpp"
 #include "tests/benchmarks/timed-execute.hpp"
 
-#include <boost/mpl/vector.hpp>
-#include <boost/mpl/vector_c.hpp>
+#include <boost/mp11/list.hpp>
 
 #include <iostream>
 
@@ -71,7 +70,7 @@
   static_assert(sizeof(ReadVarNumberTest<WIRE_SIZE>::WIRE) == WIRE_SIZE);
 };
 
-using ReadVarNumberTests = boost::mpl::vector<
+using ReadVarNumberTests = boost::mp11::mp_list<
   ReadVarNumberAlignTest<1, 0>,
   ReadVarNumberAlignTest<3, 0>,
   ReadVarNumberAlignTest<3, 1>,
diff --git a/tests/integration/face.cpp b/tests/integration/face.cpp
index a759e35..9393d0d 100644
--- a/tests/integration/face.cpp
+++ b/tests/integration/face.cpp
@@ -35,7 +35,7 @@
 #include <mutex>
 #include <thread>
 
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace ndn::tests {
 
@@ -116,7 +116,7 @@
   Scheduler sched;
 };
 
-using Transports = boost::mpl::vector<UnixTransport, TcpTransport>;
+using Transports = boost::mp11::mp_list<UnixTransport, TcpTransport>;
 
 BOOST_AUTO_TEST_SUITE(Consumer)
 
diff --git a/tests/unit/detail/tag-host.t.cpp b/tests/unit/detail/tag-host.t.cpp
index c597203..15c43f5 100644
--- a/tests/unit/detail/tag-host.t.cpp
+++ b/tests/unit/detail/tag-host.t.cpp
@@ -25,7 +25,7 @@
 
 #include "tests/boost-test.hpp"
 
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace ndn::tests {
 
@@ -52,7 +52,7 @@
   }
 };
 
-using Fixtures = boost::mpl::vector<TagHost, Interest, Data>;
+using Fixtures = boost::mp11::mp_list<TagHost, Interest, Data>;
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(Basic, T, Fixtures, T)
 {
diff --git a/tests/unit/face.t.cpp b/tests/unit/face.t.cpp
index 78d7c67..55d8245 100644
--- a/tests/unit/face.t.cpp
+++ b/tests/unit/face.t.cpp
@@ -30,6 +30,7 @@
 #include "tests/unit/io-key-chain-fixture.hpp"
 
 #include <boost/logic/tribool.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace ndn::tests {
 
@@ -911,7 +912,7 @@
 {
 };
 
-using ConfigOptions = boost::mpl::vector<WithEnv, WithConfig>;
+using ConfigOptions = boost::mp11::mp_list<WithEnv, WithConfig>;
 
 BOOST_FIXTURE_TEST_CASE(NoConfig, WithEnvAndConfig) // fixture configures test HOME and PIB/TPM path
 {
diff --git a/tests/unit/ims/in-memory-storage.t.cpp b/tests/unit/ims/in-memory-storage.t.cpp
index 31532ed..2d18ec1 100644
--- a/tests/unit/ims/in-memory-storage.t.cpp
+++ b/tests/unit/ims/in-memory-storage.t.cpp
@@ -29,17 +29,17 @@
 #include "tests/test-common.hpp"
 #include "tests/unit/io-fixture.hpp"
 
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace ndn::tests {
 
 BOOST_AUTO_TEST_SUITE(Ims)
 BOOST_AUTO_TEST_SUITE(TestInMemoryStorage)
 
-using InMemoryStorages = boost::mpl::vector<InMemoryStoragePersistent,
-                                            InMemoryStorageFifo,
-                                            InMemoryStorageLfu,
-                                            InMemoryStorageLru>;
+using InMemoryStorages = boost::mp11::mp_list<InMemoryStoragePersistent,
+                                              InMemoryStorageFifo,
+                                              InMemoryStorageLfu,
+                                              InMemoryStorageLru>;
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(Insertion, T, InMemoryStorages)
 {
@@ -371,9 +371,9 @@
   BOOST_CHECK_EQUAL(ims.size(), 6);
 }
 
-using InMemoryStoragesLimited = boost::mpl::vector<InMemoryStorageFifo,
-                                                   InMemoryStorageLfu,
-                                                   InMemoryStorageLru>;
+using InMemoryStoragesLimited = boost::mp11::mp_list<InMemoryStorageFifo,
+                                                     InMemoryStorageLfu,
+                                                     InMemoryStorageLru>;
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(SetCapacity, T, InMemoryStoragesLimited)
 {
diff --git a/tests/unit/lp/packet.t.cpp b/tests/unit/lp/packet.t.cpp
index 01cc05b..50cc681 100644
--- a/tests/unit/lp/packet.t.cpp
+++ b/tests/unit/lp/packet.t.cpp
@@ -20,6 +20,7 @@
  */
 
 #include "ndn-cxx/lp/packet.hpp"
+#include "ndn-cxx/lp/fields.hpp"
 #include "ndn-cxx/prefix-announcement.hpp"
 
 #include "tests/key-chain-fixture.hpp"
diff --git a/tests/unit/lp/pit-token.t.cpp b/tests/unit/lp/pit-token.t.cpp
index 6f45b32..9496070 100644
--- a/tests/unit/lp/pit-token.t.cpp
+++ b/tests/unit/lp/pit-token.t.cpp
@@ -20,6 +20,7 @@
  */
 
 #include "ndn-cxx/lp/pit-token.hpp"
+#include "ndn-cxx/lp/fields.hpp"
 #include "ndn-cxx/lp/packet.hpp"
 
 #include "tests/boost-test.hpp"
diff --git a/tests/unit/name-component.t.cpp b/tests/unit/name-component.t.cpp
index d4b674d..73a423b 100644
--- a/tests/unit/name-component.t.cpp
+++ b/tests/unit/name-component.t.cpp
@@ -28,7 +28,7 @@
 #include <boost/algorithm/string/case_conv.hpp>
 #include <boost/algorithm/string/predicate.hpp>
 #include <boost/lexical_cast.hpp>
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace ndn::tests {
 
@@ -305,10 +305,12 @@
 
 BOOST_AUTO_TEST_SUITE(ConstructFromIterators) // Bug 2490
 
-using ContainerTypes = boost::mpl::vector<std::vector<uint8_t>,
-                                          std::list<uint8_t>,
-                                          std::vector<int8_t>,
-                                          std::list<int8_t>>;
+using ContainerTypes = boost::mp11::mp_list<
+  std::vector<uint8_t>,
+  std::list<uint8_t>,
+  std::vector<int8_t>,
+  std::list<int8_t>
+>;
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(ZeroOctets, T, ContainerTypes)
 {
@@ -540,7 +542,7 @@
   }
 };
 
-using ConventionTests = boost::mpl::vector<
+using ConventionTests = boost::mp11::mp_list<
   NumberWithMarker,
   SegmentMarker,
   SegmentTyped,
diff --git a/tests/unit/security/certificate-bundle-fetcher.t.cpp b/tests/unit/security/certificate-bundle-fetcher.t.cpp
index 1c7b8b8..5600257 100644
--- a/tests/unit/security/certificate-bundle-fetcher.t.cpp
+++ b/tests/unit/security/certificate-bundle-fetcher.t.cpp
@@ -26,6 +26,8 @@
 #include "tests/test-common.hpp"
 #include "tests/unit/security/validator-fixture.hpp"
 
+#include <boost/mp11/list.hpp>
+
 namespace ndn::tests {
 
 using namespace ndn::security;
@@ -147,7 +149,7 @@
   face.receive(makeNack(interest, lp::NackReason::NO_ROUTE));
 }
 
-using SuccessWithBundle = boost::mpl::vector<BundleWithFinalBlockId, BundleWithoutFinalBlockId>;
+using SuccessWithBundle = boost::mp11::mp_list<BundleWithFinalBlockId, BundleWithoutFinalBlockId>;
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(ValidateSuccessWithBundle, T, SuccessWithBundle,
                                  CertificateBundleFetcherFixture<T>)
@@ -160,7 +162,7 @@
   }
 }
 
-using SuccessWithoutBundle = boost::mpl::vector<Nack, Timeout>;
+using SuccessWithoutBundle = boost::mp11::mp_list<Nack, Timeout>;
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(ValidateSuccessWithoutBundle, T, SuccessWithoutBundle,
                                  CertificateBundleFetcherFixture<T>)
diff --git a/tests/unit/security/certificate-fetcher-direct-fetch.t.cpp b/tests/unit/security/certificate-fetcher-direct-fetch.t.cpp
index a843ca6..ca185c6 100644
--- a/tests/unit/security/certificate-fetcher-direct-fetch.t.cpp
+++ b/tests/unit/security/certificate-fetcher-direct-fetch.t.cpp
@@ -27,6 +27,7 @@
 #include "tests/test-common.hpp"
 #include "tests/unit/security/validator-fixture.hpp"
 
+#include <boost/mp11/list.hpp>
 #include <boost/range/adaptor/sliced.hpp>
 #include <boost/range/adaptor/strided.hpp>
 
@@ -124,7 +125,7 @@
   face.receive(makeNack(interest, lp::NackReason::NO_ROUTE));
 }
 
-using Failures = boost::mpl::vector<Timeout, Nack>;
+using Failures = boost::mp11::mp_list<Timeout, Nack>;
 
 BOOST_FIXTURE_TEST_CASE(ValidateSuccessData, CertificateFetcherDirectFetchFixture<Cert>)
 {
diff --git a/tests/unit/security/certificate-fetcher-from-network.t.cpp b/tests/unit/security/certificate-fetcher-from-network.t.cpp
index 7ffc276..ee66ad5 100644
--- a/tests/unit/security/certificate-fetcher-from-network.t.cpp
+++ b/tests/unit/security/certificate-fetcher-from-network.t.cpp
@@ -27,6 +27,8 @@
 #include "tests/boost-test.hpp"
 #include "tests/unit/security/validator-fixture.hpp"
 
+#include <boost/mp11/list.hpp>
+
 namespace ndn::tests {
 
 using namespace ndn::security;
@@ -91,7 +93,7 @@
   face.receive(nack);
 }
 
-using Failures = boost::mpl::vector<Timeout, Nack>;
+using Failures = boost::mp11::mp_list<Timeout, Nack>;
 
 BOOST_FIXTURE_TEST_CASE(ValidateSuccess, CertificateFetcherFromNetworkFixture<Cert>)
 {
diff --git a/tests/unit/security/certificate-fetcher-offline.t.cpp b/tests/unit/security/certificate-fetcher-offline.t.cpp
index 147701f..978bc12 100644
--- a/tests/unit/security/certificate-fetcher-offline.t.cpp
+++ b/tests/unit/security/certificate-fetcher-offline.t.cpp
@@ -25,6 +25,8 @@
 #include "tests/boost-test.hpp"
 #include "tests/unit/security/validator-fixture.hpp"
 
+#include <boost/mp11/list.hpp>
+
 namespace ndn::tests {
 
 using namespace ndn::security;
@@ -44,7 +46,7 @@
 
 BOOST_FIXTURE_TEST_SUITE(TestCertificateFetcherOffline, CertificateFetcherOfflineFixture)
 
-using Packets = boost::mpl::vector<InterestV03Pkt, DataPkt>;
+using Packets = boost::mp11::mp_list<InterestV03Pkt, DataPkt>;
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(Validate, Packet, Packets)
 {
diff --git a/tests/unit/security/key-chain.t.cpp b/tests/unit/security/key-chain.t.cpp
index 15bf4cd..ac45ee7 100644
--- a/tests/unit/security/key-chain.t.cpp
+++ b/tests/unit/security/key-chain.t.cpp
@@ -28,8 +28,7 @@
 #include "tests/unit/clock-fixture.hpp"
 #include "tests/unit/test-home-env-saver.hpp"
 
-#include <openssl/opensslv.h>
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace ndn::tests {
 
@@ -530,7 +529,7 @@
   }
 };
 
-using SigningTests = boost::mpl::vector<
+using SigningTests = boost::mp11::mp_list<
   RsaSigning<DataPkt>,
   RsaSigning<InterestV02Pkt>,
   RsaSigning<InterestV03Pkt>,
diff --git a/tests/unit/security/pib/pib-impl.t.cpp b/tests/unit/security/pib/pib-impl.t.cpp
index b26109d..d3d73de 100644
--- a/tests/unit/security/pib/pib-impl.t.cpp
+++ b/tests/unit/security/pib/pib-impl.t.cpp
@@ -21,13 +21,12 @@
 
 #include "ndn-cxx/security/pib/impl/pib-memory.hpp"
 #include "ndn-cxx/security/pib/impl/pib-sqlite3.hpp"
-#include "ndn-cxx/security/security-common.hpp"
 
 #include "tests/boost-test.hpp"
 #include "tests/unit/security/pib/pib-data-fixture.hpp"
 
 #include <boost/filesystem.hpp>
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace ndn::tests {
 
@@ -57,7 +56,7 @@
   PibSqlite3 pib{m_path.string()};
 };
 
-using PibImpls = boost::mpl::vector<PibMemoryFixture, PibSqlite3Fixture>;
+using PibImpls = boost::mp11::mp_list<PibMemoryFixture, PibSqlite3Fixture>;
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(TpmLocator, T, PibImpls, T)
 {
diff --git a/tests/unit/security/signing-info.t.cpp b/tests/unit/security/signing-info.t.cpp
index 29fd8ad..cdcc0c0 100644
--- a/tests/unit/security/signing-info.t.cpp
+++ b/tests/unit/security/signing-info.t.cpp
@@ -23,7 +23,6 @@
 
 #include "tests/boost-test.hpp"
 
-#include <openssl/opensslv.h>
 #include <boost/lexical_cast.hpp>
 #include <sstream>
 
diff --git a/tests/unit/security/tpm/back-end.t.cpp b/tests/unit/security/tpm/back-end.t.cpp
index da22029..d432d73 100644
--- a/tests/unit/security/tpm/back-end.t.cpp
+++ b/tests/unit/security/tpm/back-end.t.cpp
@@ -37,9 +37,8 @@
 
 #include "tests/boost-test.hpp"
 
-#include <openssl/opensslv.h>
-#include <boost/mpl/vector.hpp>
 #include <set>
+#include <boost/mp11/list.hpp>
 
 namespace ndn::tests {
 
@@ -50,7 +49,7 @@
 BOOST_AUTO_TEST_SUITE(Security)
 BOOST_AUTO_TEST_SUITE(TestTpmBackEnd)
 
-using TestBackEnds = boost::mpl::vector<
+using TestBackEnds = boost::mp11::mp_list<
 #if defined(NDN_CXX_HAVE_OSX_FRAMEWORKS) && defined(NDN_CXX_WITH_OSX_KEYCHAIN)
   BackEndWrapperOsx,
 #endif
diff --git a/tests/unit/security/transform/private-key.t.cpp b/tests/unit/security/transform/private-key.t.cpp
index 3d77d6c..cf8dddd 100644
--- a/tests/unit/security/transform/private-key.t.cpp
+++ b/tests/unit/security/transform/private-key.t.cpp
@@ -35,7 +35,7 @@
 #include "tests/boost-test.hpp"
 
 #include <openssl/opensslv.h>
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 #include <sstream>
 
 namespace ndn::tests {
@@ -364,7 +364,7 @@
 )PEM";
 };
 
-using KeyTestDataSets = boost::mpl::vector<
+using KeyTestDataSets = boost::mp11::mp_list<
 #if OPENSSL_VERSION_NUMBER < 0x30000000L
   // DES-encrypted keys
   // .privateKeyPkcs8 uses either the PBES1 or PBES2 encryption scheme with DES-CBC-Pad (see RFC 8018)
@@ -645,7 +645,7 @@
   }
 };
 
-using KeyGenParams = boost::mpl::vector<
+using KeyGenParams = boost::mp11::mp_list<
   HmacKeyGenParams,
   RsaKeyGenParams,
   EcKeyGenParams
diff --git a/tests/unit/security/transform/public-key.t.cpp b/tests/unit/security/transform/public-key.t.cpp
index 31970c4..473ead6 100644
--- a/tests/unit/security/transform/public-key.t.cpp
+++ b/tests/unit/security/transform/public-key.t.cpp
@@ -28,7 +28,7 @@
 
 #include "tests/boost-test.hpp"
 
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 #include <sstream>
 
@@ -68,7 +68,7 @@
       "5EJTDxq6ls5FoYLfThp8HOjuwGSz0qw8ocMqyku1y0V5peQ4rEPd0bwcpZd9svA=\n";
 };
 
-using KeyTestDataSets = boost::mpl::vector<RsaKeyTestData, EcKeyTestData>;
+using KeyTestDataSets = boost::mp11::mp_list<RsaKeyTestData, EcKeyTestData>;
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(LoadAndSave, T, KeyTestDataSets)
 {
diff --git a/tests/unit/security/transform/stream-source.t.cpp b/tests/unit/security/transform/stream-source.t.cpp
index e20ff23..1500226 100644
--- a/tests/unit/security/transform/stream-source.t.cpp
+++ b/tests/unit/security/transform/stream-source.t.cpp
@@ -24,8 +24,7 @@
 
 #include "tests/boost-test.hpp"
 
-#include <boost/mpl/integral_c.hpp>
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace ndn::tests {
 
@@ -76,9 +75,9 @@
   BOOST_CHECK_EQUAL(os.str(), "");
 }
 
-using BadBits = boost::mpl::vector<
-  boost::mpl::integral_c<std::ios_base::iostate, std::ios_base::badbit>,
-  boost::mpl::integral_c<std::ios_base::iostate, std::ios_base::failbit>
+using BadBits = boost::mp11::mp_list_c<std::ios_base::iostate,
+  std::ios_base::badbit,
+  std::ios_base::failbit
 >;
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(BadStream, BadBit, BadBits)
diff --git a/tests/unit/security/transform/verifier-filter.t.cpp b/tests/unit/security/transform/verifier-filter.t.cpp
index 4f659be..cda900e 100644
--- a/tests/unit/security/transform/verifier-filter.t.cpp
+++ b/tests/unit/security/transform/verifier-filter.t.cpp
@@ -33,8 +33,6 @@
 
 #include "tests/boost-test.hpp"
 
-#include <openssl/opensslv.h>
-
 namespace ndn::tests {
 
 using namespace ndn::security::transform;
diff --git a/tests/unit/security/validation-policy-accept-all.t.cpp b/tests/unit/security/validation-policy-accept-all.t.cpp
index ca86c86..9fe1ba3 100644
--- a/tests/unit/security/validation-policy-accept-all.t.cpp
+++ b/tests/unit/security/validation-policy-accept-all.t.cpp
@@ -24,7 +24,7 @@
 #include "tests/boost-test.hpp"
 #include "tests/unit/security/validator-fixture.hpp"
 
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace ndn::tests {
 
@@ -45,7 +45,7 @@
 
 BOOST_FIXTURE_TEST_SUITE(TestValidationPolicyAcceptAll, ValidationPolicyAcceptAllFixture)
 
-using Packets = boost::mpl::vector<Interest, Data>;
+using Packets = boost::mp11::mp_list<Interest, Data>;
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(Validate, Packet, Packets)
 {
diff --git a/tests/unit/security/validation-policy-command-interest.t.cpp b/tests/unit/security/validation-policy-command-interest.t.cpp
index ac690e7..657b830 100644
--- a/tests/unit/security/validation-policy-command-interest.t.cpp
+++ b/tests/unit/security/validation-policy-command-interest.t.cpp
@@ -28,7 +28,7 @@
 #include "tests/test-common.hpp"
 #include "tests/unit/security/validator-fixture.hpp"
 
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace ndn::tests {
 
@@ -339,10 +339,7 @@
 
 BOOST_AUTO_TEST_SUITE(Options)
 
-using NonPositiveGracePeriods = boost::mpl::vector<
-  GracePeriodSeconds<0>,
-  GracePeriodSeconds<-1>
->;
+using NonPositiveGracePeriods = boost::mp11::mp_list<GracePeriodSeconds<0>, GracePeriodSeconds<-1>>;
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(GraceNonPositive, GracePeriod, NonPositiveGracePeriods,
                                  ValidationPolicyCommandInterestFixture<GracePeriod>)
diff --git a/tests/unit/security/validation-policy-config.t.cpp b/tests/unit/security/validation-policy-config.t.cpp
index 07b98e9..031eff0 100644
--- a/tests/unit/security/validation-policy-config.t.cpp
+++ b/tests/unit/security/validation-policy-config.t.cpp
@@ -30,6 +30,8 @@
 #include "tests/unit/security/validator-config/common.hpp"
 #include "tests/unit/security/validator-fixture.hpp"
 
+#include <boost/mp11/list.hpp>
+
 namespace ndn::tests {
 
 using ndn::security::ValidationPolicyConfig;
@@ -341,27 +343,29 @@
   }
 };
 
-using DataPolicies = boost::mpl::vector<LoadStringWithFileAnchor<Data>,
-                                        LoadFileWithFileAnchor<Data>,
-                                        LoadFileWithMultipleFileAnchors<Data>,
-                                        LoadSectionWithFileAnchor<Data>,
-                                        LoadStringWithBase64Anchor<Data>,
-                                        LoadStringWithDirAnchor<Data>,
-                                        LoadStringWithDirAnchor<Data, Refresh1h>,
-                                        LoadStringWithDirAnchor<Data, Refresh1m>,
-                                        LoadStringWithDirAnchor<Data, Refresh1s>
-                                        >;
+using DataPolicies = boost::mp11::mp_list<
+  LoadStringWithFileAnchor<Data>,
+  LoadFileWithFileAnchor<Data>,
+  LoadFileWithMultipleFileAnchors<Data>,
+  LoadSectionWithFileAnchor<Data>,
+  LoadStringWithBase64Anchor<Data>,
+  LoadStringWithDirAnchor<Data>,
+  LoadStringWithDirAnchor<Data, Refresh1h>,
+  LoadStringWithDirAnchor<Data, Refresh1m>,
+  LoadStringWithDirAnchor<Data, Refresh1s>
+>;
 
-using InterestPolicies = boost::mpl::vector<LoadStringWithFileAnchor<Interest>,
-                                            LoadFileWithFileAnchor<Interest>,
-                                            LoadFileWithMultipleFileAnchors<Interest>,
-                                            LoadSectionWithFileAnchor<Interest>,
-                                            LoadStringWithBase64Anchor<Interest>,
-                                            LoadStringWithDirAnchor<Interest>,
-                                            LoadStringWithDirAnchor<Interest, Refresh1h>,
-                                            LoadStringWithDirAnchor<Interest, Refresh1m>,
-                                            LoadStringWithDirAnchor<Interest, Refresh1s>
-                                            >;
+using InterestPolicies = boost::mp11::mp_list<
+  LoadStringWithFileAnchor<Interest>,
+  LoadFileWithFileAnchor<Interest>,
+  LoadFileWithMultipleFileAnchors<Interest>,
+  LoadSectionWithFileAnchor<Interest>,
+  LoadStringWithBase64Anchor<Interest>,
+  LoadStringWithDirAnchor<Interest>,
+  LoadStringWithDirAnchor<Interest, Refresh1h>,
+  LoadStringWithDirAnchor<Interest, Refresh1m>,
+  LoadStringWithDirAnchor<Interest, Refresh1s>
+>;
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(ValidateData, Policy, DataPolicies, Policy)
 {
@@ -687,7 +691,7 @@
   BOOST_CHECK_EQUAL(this->policy.m_interestRules.size(), 0);
 }
 
-using Packets = boost::mpl::vector<Interest, Data>;
+using Packets = boost::mp11::mp_list<Interest, Data>;
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(TrustAnchorWildcard, Packet, Packets, ValidationPolicyConfigFixture<Packet>)
 {
@@ -729,7 +733,7 @@
   VALIDATE_SUCCESS(packet, "Policy should accept everything");
 }
 
-using RefreshPolicies = boost::mpl::vector<Refresh1h, Refresh1m, Refresh1s>;
+using RefreshPolicies = boost::mp11::mp_list<Refresh1h, Refresh1m, Refresh1s>;
 
 template<typename RefreshPolicy>
 class RefreshPolicyFixture : public LoadStringWithDirAnchor<Data, RefreshPolicy>
diff --git a/tests/unit/security/validation-policy-signed-interest.t.cpp b/tests/unit/security/validation-policy-signed-interest.t.cpp
index ded8825..2cd91a7 100644
--- a/tests/unit/security/validation-policy-signed-interest.t.cpp
+++ b/tests/unit/security/validation-policy-signed-interest.t.cpp
@@ -28,7 +28,7 @@
 #include "tests/test-common.hpp"
 #include "tests/unit/security/validator-fixture.hpp"
 
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace ndn::tests {
 
@@ -322,10 +322,7 @@
   VALIDATE_SUCCESS(i4, "Should succeed");
 }
 
-using NonPositiveGracePeriods = boost::mpl::vector<
-  GracePeriodSeconds<0>,
-  GracePeriodSeconds<-1>
->;
+using NonPositiveGracePeriods = boost::mp11::mp_list<GracePeriodSeconds<0>, GracePeriodSeconds<-1>>;
 
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(GraceNonPositive, GracePeriod, NonPositiveGracePeriods,
                                  ValidationPolicySignedInterestFixture<GracePeriod>)
diff --git a/tests/unit/security/validation-policy-simple-hierarchy.t.cpp b/tests/unit/security/validation-policy-simple-hierarchy.t.cpp
index 80fc58a..11e7ee1 100644
--- a/tests/unit/security/validation-policy-simple-hierarchy.t.cpp
+++ b/tests/unit/security/validation-policy-simple-hierarchy.t.cpp
@@ -24,7 +24,7 @@
 #include "tests/boost-test.hpp"
 #include "tests/unit/security/validator-fixture.hpp"
 
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace ndn::tests {
 
@@ -32,7 +32,7 @@
 BOOST_FIXTURE_TEST_SUITE(TestValidationPolicySimpleHierarchy,
                          HierarchicalValidatorFixture<security::ValidationPolicySimpleHierarchy>)
 
-using Packets = boost::mpl::vector<InterestV03Pkt, DataPkt>;
+using Packets = boost::mp11::mp_list<InterestV03Pkt, DataPkt>;
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(Validate, Packet, Packets)
 {
diff --git a/tests/unit/security/validator-config/checker.t.cpp b/tests/unit/security/validator-config/checker.t.cpp
index 6c61085..d7e2fb9 100644
--- a/tests/unit/security/validator-config/checker.t.cpp
+++ b/tests/unit/security/validator-config/checker.t.cpp
@@ -20,13 +20,13 @@
  */
 
 #include "ndn-cxx/security/validator-config/checker.hpp"
-#include "ndn-cxx/security/validation-policy.hpp"
-#include "ndn-cxx/security/validation-state.hpp"
 
 #include "tests/boost-test.hpp"
 #include "tests/unit/security/validator-fixture.hpp"
 #include "tests/unit/security/validator-config/common.hpp"
 
+#include <boost/mp11/algorithm.hpp>
+
 namespace ndn::tests {
 
 using namespace ndn::security::validator_config;
@@ -283,7 +283,7 @@
                                              {false, false, false, true}};
 };
 
-using CheckerFixtures = boost::mpl::vector<
+using CheckerFixtures = boost::mp11::mp_list<
   NameRelationEqual,
   NameRelationIsPrefixOf,
   NameRelationIsStrictPrefixOf,
@@ -300,19 +300,16 @@
 >;
 
 // Cartesian product of [DataPkt, InterestV02Pkt, InterestV03Pkt] and CheckerFixtures.
-// Each element is a boost::mpl::pair<PktType, CheckerFixture>.
-using Tests = boost::mpl::fold<
-  CheckerFixtures,
-  boost::mpl::vector<>,
-  boost::mpl::push_back<boost::mpl::push_back<boost::mpl::push_back<boost::mpl::_1,
-    boost::mpl::pair<DataPkt, boost::mpl::_2>>,
-    boost::mpl::pair<InterestV02Pkt, boost::mpl::_2>>,
-    boost::mpl::pair<InterestV03Pkt, boost::mpl::_2>>
->::type;
+// Each element is an mp_list<PktType, Fixture>.
+using Tests = boost::mp11::mp_product<
+  boost::mp11::mp_list,
+  boost::mp11::mp_list<DataPkt, InterestV02Pkt, InterestV03Pkt>,
+  CheckerFixtures
+>;
 
-BOOST_FIXTURE_TEST_CASE_TEMPLATE(Checks, T, Tests, T::second)
+BOOST_FIXTURE_TEST_CASE_TEMPLATE(Checks, T, Tests, boost::mp11::mp_second<T>)
 {
-  using PktType = typename T::first;
+  using PktType = boost::mp11::mp_first<T>;
 
   BOOST_REQUIRE_EQUAL(this->outcomes.size(), this->names.size());
   for (size_t i = 0; i < this->names.size(); ++i) {
@@ -326,7 +323,6 @@
       this->template testChecker<PktType>(this->checker, tlv::SignatureSha256WithRsa, pktName, klName, expectedOutcome);
       this->template testChecker<PktType>(this->checker, tlv::SignatureSha256WithEcdsa, pktName, klName, false);
 
-
       klName = this->makeKeyLocatorCertName(this->names[j]);
       this->template testChecker<PktType>(this->checker, tlv::SignatureSha256WithRsa, pktName, klName, expectedOutcome);
       this->template testChecker<PktType>(this->checker, tlv::SignatureSha256WithEcdsa, pktName, klName, false);
diff --git a/tests/unit/security/validator-config/rule.t.cpp b/tests/unit/security/validator-config/rule.t.cpp
index ea0b4b7..434a0c9 100644
--- a/tests/unit/security/validator-config/rule.t.cpp
+++ b/tests/unit/security/validator-config/rule.t.cpp
@@ -25,7 +25,7 @@
 #include "tests/unit/security/validator-fixture.hpp"
 #include "tests/unit/security/validator-config/common.hpp"
 
-#include <boost/mpl/vector_c.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace ndn::tests {
 
@@ -52,7 +52,7 @@
   shared_ptr<security::ValidationState> state;
 };
 
-using PktTypes = boost::mpl::vector<DataPkt, InterestV02Pkt, InterestV03Pkt>;
+using PktTypes = boost::mp11::mp_list<DataPkt, InterestV02Pkt, InterestV03Pkt>;
 
 BOOST_AUTO_TEST_SUITE(TestRule)
 
diff --git a/tests/unit/security/verification-helpers.t.cpp b/tests/unit/security/verification-helpers.t.cpp
index 540a133..0e34bcd 100644
--- a/tests/unit/security/verification-helpers.t.cpp
+++ b/tests/unit/security/verification-helpers.t.cpp
@@ -26,8 +26,7 @@
 #include "tests/key-chain-fixture.hpp"
 #include "tests/test-common.hpp"
 
-#include <openssl/opensslv.h>
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace ndn::tests {
 
@@ -536,7 +535,7 @@
 // - .badSigInterestOldFormat is a valid and signed Interest packet that cannot be verified against
 //   .cert (signed using a different private key and in the old signed Interest format)
 
-using SignatureDatasets = boost::mpl::vector<EcdsaDataset, RsaDataset>;
+using SignatureDatasets = boost::mp11::mp_list<EcdsaDataset, RsaDataset>;
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(VerifySignature, Dataset, SignatureDatasets)
 {
@@ -616,7 +615,7 @@
   BOOST_CHECK(verifySignature(interestOldFormat, tpm, signingInfo.getSignerName(), DigestAlgorithm::SHA256));
 }
 
-using DigestDatasets = boost::mpl::vector<Sha256Dataset>;
+using DigestDatasets = boost::mp11::mp_list<Sha256Dataset>;
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(VerifyDigest, Dataset, DigestDatasets)
 {
diff --git a/tests/unit/util/io.t.cpp b/tests/unit/util/io.t.cpp
index 934648a..3492fa1 100644
--- a/tests/unit/util/io.t.cpp
+++ b/tests/unit/util/io.t.cpp
@@ -25,7 +25,7 @@
 #include "tests/key-chain-fixture.hpp"
 
 #include <boost/filesystem.hpp>
-#include <boost/mpl/vector.hpp>
+#include <boost/mp11/list.hpp>
 
 namespace ndn::tests {
 
@@ -53,7 +53,7 @@
   std::istringstream stream{"486578456E63", std::ios_base::binary};
 };
 
-using Encodings = boost::mpl::vector<NoEncoding, Base64Encoding, HexEncoding>;
+using Encodings = boost::mp11::mp_list<NoEncoding, Base64Encoding, HexEncoding>;
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(LoadBuffer, T, Encodings)
 {