diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index f086c17..7c6d282 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -136,7 +136,7 @@
     """
     def getGeneralFlags(self, conf):
         flags = super(GccBasicFlags, self).getGeneralFlags(conf)
-        flags['CXXFLAGS'] += ['-std=c++14']
+        flags['CXXFLAGS'] += ['-std=c++17']
         if Utils.unversioned_sys_platform() == 'linux':
             flags['LINKFLAGS'] += ['-fuse-ld=gold']
         elif Utils.unversioned_sys_platform() == 'freebsd':
diff --git a/README.md b/README.md
index b4ce805..910d3f2 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,8 @@
-# NFD - Named Data Networking Forwarding Daemon
+# NFD: Named Data Networking Forwarding Daemon
 
 [![CI](https://github.com/named-data/NFD/actions/workflows/ci.yml/badge.svg)](https://github.com/named-data/NFD/actions/workflows/ci.yml)
 [![Docs](https://github.com/named-data/NFD/actions/workflows/docs.yml/badge.svg)](https://github.com/named-data/NFD/actions/workflows/docs.yml)
-![Language](https://img.shields.io/badge/C%2B%2B-14-blue)
+![Language](https://img.shields.io/badge/C%2B%2B-17-blue)
 ![Latest version](https://img.shields.io/github/v/tag/named-data/NFD?label=Latest%20version)
 
 ## Overview
diff --git a/core/common.hpp b/core/common.hpp
index 01f794c..a5f47d9 100644
--- a/core/common.hpp
+++ b/core/common.hpp
@@ -50,11 +50,10 @@
 #include <limits>
 #include <map>
 #include <memory>
+#include <optional>
 #include <set>
 #include <stdexcept>
 #include <string>
-#include <unordered_map>
-#include <unordered_set>
 #include <utility>
 #include <vector>
 
@@ -66,7 +65,6 @@
 #include <ndn-cxx/net/face-uri.hpp>
 #include <ndn-cxx/util/backports.hpp>
 #include <ndn-cxx/util/exception.hpp>
-#include <ndn-cxx/util/optional.hpp>
 #include <ndn-cxx/util/scheduler.hpp>
 #include <ndn-cxx/util/signal.hpp>
 #include <ndn-cxx/util/span.hpp>
@@ -96,8 +94,6 @@
 
 using namespace std::string_literals;
 
-using ndn::optional;
-using ndn::nullopt;
 using ndn::span;
 using ndn::to_string;
 
diff --git a/daemon/common/config-file.hpp b/daemon/common/config-file.hpp
index c58de29..39cc2ed 100644
--- a/daemon/common/config-file.hpp
+++ b/daemon/common/config-file.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -105,9 +105,9 @@
   static T
   parseNumber(const ConfigSection& node, const std::string& key, const std::string& sectionName)
   {
-    static_assert(std::is_arithmetic<T>::value, "T must be an arithmetic type");
+    static_assert(std::is_arithmetic_v<T>);
 
-    boost::optional<T> value = node.get_value_optional<T>();
+    auto value = node.get_value_optional<T>();
     // Unsigned logic is workaround for https://redmine.named-data.net/issues/4489
     if (value &&
         (std::is_signed<T>() || node.get_value<std::string>().find("-") == std::string::npos)) {
@@ -132,7 +132,7 @@
   static void
   checkRange(T value, T min, T max, const std::string& key, const std::string& sectionName)
   {
-    static_assert(std::is_integral<T>::value, "T must be an integral type");
+    static_assert(std::is_integral_v<T>);
 
     if (value < min || value > max) {
       NDN_THROW(Error("Invalid value '" + to_string(value) + "' for option '" + key +
diff --git a/daemon/face/ethernet-channel.cpp b/daemon/face/ethernet-channel.cpp
index 5f3f295..fae9af2 100644
--- a/daemon/face/ethernet-channel.cpp
+++ b/daemon/face/ethernet-channel.cpp
@@ -207,7 +207,7 @@
   auto transport = make_unique<UnicastEthernetTransport>(*m_localEndpoint, remoteEndpoint,
                                                          params.persistency, m_idleFaceTimeout);
   auto face = make_shared<Face>(std::move(linkService), std::move(transport));
-  face->setChannel(shared_from_this()); // use weak_from_this() in C++17
+  face->setChannel(weak_from_this());
 
   m_channelFaces[remoteEndpoint] = face;
   connectFaceClosedSignal(*face, [this, remoteEndpoint] {
diff --git a/daemon/face/face-common.hpp b/daemon/face/face-common.hpp
index e2a0572..0e6f0bb 100644
--- a/daemon/face/face-common.hpp
+++ b/daemon/face/face-common.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -78,9 +78,9 @@
 struct FaceParams
 {
   ndn::nfd::FacePersistency persistency = ndn::nfd::FACE_PERSISTENCY_PERSISTENT;
-  optional<time::nanoseconds> baseCongestionMarkingInterval;
-  optional<uint64_t> defaultCongestionThreshold;
-  optional<ssize_t> mtu;
+  std::optional<time::nanoseconds> baseCongestionMarkingInterval;
+  std::optional<uint64_t> defaultCongestionThreshold;
+  std::optional<ssize_t> mtu;
   bool wantLocalFields = false;
   bool wantLpReliability = false;
   boost::logic::tribool wantCongestionMarking = boost::logic::indeterminate;
@@ -128,9 +128,7 @@
 // implementation detail
 #define NFD_LOG_FACE(level, msg) NFD_LOG_##level( \
   ::nfd::face::FaceLogHelper< \
-    typename std::remove_cv< \
-      typename std::remove_reference<decltype(*this)>::type \
-    >::type \
+    std::remove_cv_t<std::remove_reference_t<decltype(*this)>> \
   >(*this) \
   << msg)
 /** \endcond */
diff --git a/daemon/face/face-counters.hpp b/daemon/face/face-counters.hpp
index aed0ba4..bfe08bd 100644
--- a/daemon/face/face-counters.hpp
+++ b/daemon/face/face-counters.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -50,7 +50,7 @@
    *  \throw std::bad_cast counters type mismatch
    */
   template<typename T>
-  typename std::enable_if<std::is_base_of<LinkService::Counters, T>::value, const T&>::type
+  std::enable_if_t<std::is_base_of_v<LinkService::Counters, T>, const T&>
   get() const
   {
     return dynamic_cast<const T&>(m_linkServiceCounters);
@@ -61,7 +61,7 @@
    *  \throw std::bad_cast counters type mismatch
    */
   template<typename T>
-  typename std::enable_if<std::is_base_of<Transport::Counters, T>::value, const T&>::type
+  std::enable_if_t<std::is_base_of_v<Transport::Counters, T>, const T&>
   get() const
   {
     return dynamic_cast<const T&>(m_transportCounters);
diff --git a/daemon/face/face.hpp b/daemon/face/face.hpp
index c91e78a..e9731ee 100644
--- a/daemon/face/face.hpp
+++ b/daemon/face/face.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -36,9 +36,10 @@
 
 class Channel;
 
-/** \brief indicates the state of a face
+/**
+ * \brief Indicates the state of a face.
  */
-typedef TransportState FaceState;
+using FaceState = TransportState;
 
 /** \brief generalization of a network interface
  *
diff --git a/daemon/face/link-service.hpp b/daemon/face/link-service.hpp
index c623622..e62c1a3 100644
--- a/daemon/face/link-service.hpp
+++ b/daemon/face/link-service.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -75,9 +75,10 @@
 class LinkService : protected virtual LinkServiceCounters, noncopyable
 {
 public:
-  /** \brief counters provided by LinkService
+  /**
+   * \brief %Counters provided by LinkService.
    */
-  typedef LinkServiceCounters Counters;
+  using Counters = LinkServiceCounters;
 
 public:
   LinkService();
@@ -250,8 +251,8 @@
 operator<<(std::ostream& os, const FaceLogHelper<LinkService>& flh);
 
 template<typename T>
-typename std::enable_if<std::is_base_of<LinkService, T>::value &&
-                        !std::is_same<LinkService, T>::value, std::ostream&>::type
+std::enable_if_t<std::is_base_of_v<LinkService, T> && !std::is_same_v<LinkService, T>,
+                 std::ostream&>
 operator<<(std::ostream& os, const FaceLogHelper<T>& flh)
 {
   return os << FaceLogHelper<LinkService>(flh.obj);
diff --git a/daemon/face/protocol-factory.hpp b/daemon/face/protocol-factory.hpp
index ed87de3..50023cc 100644
--- a/daemon/face/protocol-factory.hpp
+++ b/daemon/face/protocol-factory.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -133,7 +133,7 @@
   struct CreateFaceRequest
   {
     FaceUri remoteUri;
-    optional<FaceUri> localUri;
+    std::optional<FaceUri> localUri;
     FaceParams params;
   };
 
diff --git a/daemon/face/tcp-channel.cpp b/daemon/face/tcp-channel.cpp
index 3382a91..2dd454d 100644
--- a/daemon/face/tcp-channel.cpp
+++ b/daemon/face/tcp-channel.cpp
@@ -138,7 +138,7 @@
                                           socket.remote_endpoint().address());
     auto transport = make_unique<TcpTransport>(std::move(socket), params.persistency, faceScope);
     face = make_shared<Face>(std::move(linkService), std::move(transport));
-    face->setChannel(shared_from_this()); // use weak_from_this() in C++17
+    face->setChannel(weak_from_this());
 
     m_channelFaces[remoteEndpoint] = face;
     connectFaceClosedSignal(*face, [this, remoteEndpoint] { m_channelFaces.erase(remoteEndpoint); });
diff --git a/daemon/face/tcp-channel.hpp b/daemon/face/tcp-channel.hpp
index bc6fba4..19c714c 100644
--- a/daemon/face/tcp-channel.hpp
+++ b/daemon/face/tcp-channel.hpp
@@ -31,7 +31,7 @@
 namespace nfd {
 
 namespace tcp {
-typedef boost::asio::ip::tcp::endpoint Endpoint;
+using Endpoint = boost::asio::ip::tcp::endpoint;
 } // namespace tcp
 
 namespace face {
diff --git a/daemon/face/transport.hpp b/daemon/face/transport.hpp
index 9fb9c03..9b84c99 100644
--- a/daemon/face/transport.hpp
+++ b/daemon/face/transport.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -469,8 +469,8 @@
 operator<<(std::ostream& os, const FaceLogHelper<Transport>& flh);
 
 template<typename T>
-typename std::enable_if<std::is_base_of<Transport, T>::value &&
-                        !std::is_same<Transport, T>::value, std::ostream&>::type
+std::enable_if_t<std::is_base_of_v<Transport, T> && !std::is_same_v<Transport, T>,
+                 std::ostream&>
 operator<<(std::ostream& os, const FaceLogHelper<T>& flh)
 {
   return os << FaceLogHelper<Transport>(flh.obj);
diff --git a/daemon/face/udp-channel.cpp b/daemon/face/udp-channel.cpp
index bb836d2..8804f06 100644
--- a/daemon/face/udp-channel.cpp
+++ b/daemon/face/udp-channel.cpp
@@ -189,7 +189,7 @@
   auto transport = make_unique<UnicastUdpTransport>(std::move(socket), params.persistency,
                                                     m_idleFaceTimeout);
   auto face = make_shared<Face>(std::move(linkService), std::move(transport));
-  face->setChannel(shared_from_this()); // use weak_from_this() in C++17
+  face->setChannel(weak_from_this());
 
   m_channelFaces[remoteEndpoint] = face;
   connectFaceClosedSignal(*face, [this, remoteEndpoint] { m_channelFaces.erase(remoteEndpoint); });
diff --git a/daemon/face/udp-factory.cpp b/daemon/face/udp-factory.cpp
index 8f7f77c..9f43ad1 100644
--- a/daemon/face/udp-factory.cpp
+++ b/daemon/face/udp-factory.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -382,7 +382,7 @@
   return face;
 }
 
-static optional<ip::address>
+static std::optional<ip::address>
 pickAddress(const net::NetworkInterface& netif, net::AddressFamily af)
 {
   for (const auto& na : netif.getNetworkAddresses()) {
@@ -391,7 +391,7 @@
       return na.getIp();
     }
   }
-  return nullopt;
+  return std::nullopt;
 }
 
 std::vector<shared_ptr<Face>>
diff --git a/daemon/face/unix-stream-channel.cpp b/daemon/face/unix-stream-channel.cpp
index 760a264..7fb828b 100644
--- a/daemon/face/unix-stream-channel.cpp
+++ b/daemon/face/unix-stream-channel.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -137,7 +137,7 @@
   auto linkService = make_unique<GenericLinkService>(options);
   auto transport = make_unique<UnixStreamTransport>(std::move(m_socket));
   auto face = make_shared<Face>(std::move(linkService), std::move(transport));
-  face->setChannel(shared_from_this()); // use weak_from_this() in C++17
+  face->setChannel(weak_from_this());
 
   ++m_size;
   connectFaceClosedSignal(*face, [this] { --m_size; });
diff --git a/daemon/face/unix-stream-channel.hpp b/daemon/face/unix-stream-channel.hpp
index 1faffa8..c65f784 100644
--- a/daemon/face/unix-stream-channel.hpp
+++ b/daemon/face/unix-stream-channel.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -31,7 +31,7 @@
 namespace nfd {
 
 namespace unix_stream {
-typedef boost::asio::local::stream_protocol::endpoint Endpoint;
+using Endpoint = boost::asio::local::stream_protocol::endpoint;
 } // namespace unix_stream
 
 namespace face {
@@ -51,11 +51,7 @@
   class Error : public std::runtime_error
   {
   public:
-    explicit
-    Error(const std::string& what)
-      : std::runtime_error(what)
-    {
-    }
+    using std::runtime_error::runtime_error;
   };
 
   /**
diff --git a/daemon/face/unix-stream-transport.cpp b/daemon/face/unix-stream-transport.cpp
index 483a138..a051ca9 100644
--- a/daemon/face/unix-stream-transport.cpp
+++ b/daemon/face/unix-stream-transport.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -34,7 +34,7 @@
   : StreamTransport(std::move(socket))
 {
   static_assert(
-    std::is_same<std::remove_cv<protocol::socket::native_handle_type>::type, int>::value,
+    std::is_same_v<std::remove_cv_t<protocol::socket::native_handle_type>, int>,
     "The native handle type for UnixStreamTransport sockets must be 'int'"
   );
 
diff --git a/daemon/face/websocket-channel.cpp b/daemon/face/websocket-channel.cpp
index 957c9ad..2ee41cd 100644
--- a/daemon/face/websocket-channel.cpp
+++ b/daemon/face/websocket-channel.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -126,7 +126,7 @@
   auto linkService = make_unique<GenericLinkService>();
   auto transport = make_unique<WebSocketTransport>(hdl, m_server, m_pingInterval);
   auto face = make_shared<Face>(std::move(linkService), std::move(transport));
-  face->setChannel(shared_from_this()); // use weak_from_this() in C++17
+  face->setChannel(weak_from_this());
 
   BOOST_ASSERT(m_channelFaces.count(hdl) == 0);
   m_channelFaces[hdl] = face;
diff --git a/daemon/face/websocket-channel.hpp b/daemon/face/websocket-channel.hpp
index 1729841..52bf20f 100644
--- a/daemon/face/websocket-channel.hpp
+++ b/daemon/face/websocket-channel.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -32,7 +32,7 @@
 namespace nfd {
 
 namespace websocket {
-typedef boost::asio::ip::tcp::endpoint Endpoint;
+using Endpoint = boost::asio::ip::tcp::endpoint;
 } // namespace websocket
 
 namespace face {
diff --git a/daemon/fw/access-strategy.hpp b/daemon/fw/access-strategy.hpp
index edcf63b..1aaa5ed 100644
--- a/daemon/fw/access-strategy.hpp
+++ b/daemon/fw/access-strategy.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -31,6 +31,8 @@
 
 #include <ndn-cxx/util/rtt-estimator.hpp>
 
+#include <unordered_map>
+
 namespace nfd {
 namespace fw {
 
diff --git a/daemon/fw/asf-measurements.hpp b/daemon/fw/asf-measurements.hpp
index aede00b..a3eafc9 100644
--- a/daemon/fw/asf-measurements.hpp
+++ b/daemon/fw/asf-measurements.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -31,6 +31,8 @@
 
 #include <ndn-cxx/util/rtt-estimator.hpp>
 
+#include <unordered_map>
+
 namespace nfd {
 namespace fw {
 namespace asf {
diff --git a/daemon/fw/self-learning-strategy.cpp b/daemon/fw/self-learning-strategy.cpp
index 80630dc..89ca397 100644
--- a/daemon/fw/self-learning-strategy.cpp
+++ b/daemon/fw/self-learning-strategy.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -193,7 +193,7 @@
 
   runOnRibIoService([pitEntryWeak = weak_ptr<pit::Entry>{pitEntry}, inFaceId = inFace.getId(), data, this] {
     rib::Service::get().getRibManager().slFindAnn(data.getName(),
-      [pitEntryWeak, inFaceId, data, this] (optional<ndn::PrefixAnnouncement> paOpt) {
+      [pitEntryWeak, inFaceId, data, this] (std::optional<ndn::PrefixAnnouncement> paOpt) {
         if (paOpt) {
           runOnMainIoService([pitEntryWeak, inFaceId, data, pa = std::move(*paOpt), this] {
             auto pitEntry = pitEntryWeak.lock();
diff --git a/daemon/fw/strategy.cpp b/daemon/fw/strategy.cpp
index fa948ee..1f7babc 100644
--- a/daemon/fw/strategy.cpp
+++ b/daemon/fw/strategy.cpp
@@ -31,6 +31,7 @@
 
 #include <boost/range/adaptor/map.hpp>
 #include <boost/range/algorithm/copy.hpp>
+#include <unordered_set>
 
 namespace nfd {
 namespace fw {
@@ -127,7 +128,7 @@
       return {input.getPrefix(i + 1), input[i].toVersion(), input.getSubName(i + 1)};
     }
   }
-  return {input, nullopt, PartialName()};
+  return {input, std::nullopt, PartialName()};
 }
 
 Name
diff --git a/daemon/fw/strategy.hpp b/daemon/fw/strategy.hpp
index 50c79dc..4e162bd 100644
--- a/daemon/fw/strategy.hpp
+++ b/daemon/fw/strategy.hpp
@@ -377,7 +377,7 @@
   struct ParsedInstanceName
   {
     Name strategyName; ///< Strategy name without parameters
-    optional<uint64_t> version; ///< The strategy version number, if present
+    std::optional<uint64_t> version; ///< The strategy version number, if present
     PartialName parameters; ///< Parameter components, may be empty
   };
 
@@ -445,7 +445,7 @@
   // Note: only arithmetic types are supported by getOrDefault() for now
 
   template<typename T>
-  std::enable_if_t<std::is_signed<T>::value, T>
+  std::enable_if_t<std::is_signed_v<T>, T>
   getOrDefault(const key_type& key, const T& defaultVal) const
   {
     auto it = find(key);
@@ -461,7 +461,7 @@
   }
 
   template<typename T>
-  std::enable_if_t<std::is_unsigned<T>::value, T>
+  std::enable_if_t<std::is_unsigned_v<T>, T>
   getOrDefault(const key_type& key, const T& defaultVal) const
   {
     auto it = find(key);
diff --git a/daemon/mgmt/command-authenticator.cpp b/daemon/mgmt/command-authenticator.cpp
index 7c3cb23..ebf7991 100644
--- a/daemon/mgmt/command-authenticator.cpp
+++ b/daemon/mgmt/command-authenticator.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -51,12 +51,12 @@
 
 /** \brief obtain signer from SignerTag attached to Interest, if available
  */
-static optional<std::string>
+static std::optional<std::string>
 getSignerFromTag(const Interest& interest)
 {
-  shared_ptr<SignerTag> signerTag = interest.getTag<SignerTag>();
+  auto signerTag = interest.getTag<SignerTag>();
   if (signerTag == nullptr) {
-    return nullopt;
+    return std::nullopt;
   }
   else {
     return signerTag->get().toUri();
diff --git a/daemon/mgmt/command-authenticator.hpp b/daemon/mgmt/command-authenticator.hpp
index 8d5158e..12c6c70 100644
--- a/daemon/mgmt/command-authenticator.hpp
+++ b/daemon/mgmt/command-authenticator.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -31,6 +31,8 @@
 #include <ndn-cxx/mgmt/dispatcher.hpp>
 #include <ndn-cxx/security/validator.hpp>
 
+#include <unordered_map>
+
 namespace nfd {
 
 /** \brief Provides ControlCommand authorization according to NFD configuration file.
diff --git a/daemon/mgmt/face-manager.cpp b/daemon/mgmt/face-manager.cpp
index 1d38f43..839a6fb 100644
--- a/daemon/mgmt/face-manager.cpp
+++ b/daemon/mgmt/face-manager.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -87,7 +87,7 @@
     return;
   }
 
-  optional<FaceUri> localUri;
+  std::optional<FaceUri> localUri;
   if (parameters.hasLocalUri()) {
     localUri = FaceUri{};
 
diff --git a/daemon/mgmt/rib-manager.cpp b/daemon/mgmt/rib-manager.cpp
index 4e444bf..d66baea 100644
--- a/daemon/mgmt/rib-manager.cpp
+++ b/daemon/mgmt/rib-manager.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -125,7 +125,7 @@
 }
 
 void
-RibManager::beginAddRoute(const Name& name, Route route, optional<time::nanoseconds> expires,
+RibManager::beginAddRoute(const Name& name, Route route, std::optional<time::nanoseconds> expires,
                           const std::function<void(RibUpdateResult)>& done)
 {
   if (expires) {
@@ -238,7 +238,7 @@
   route.cost = parameters.getCost();
   route.flags = parameters.getFlags();
 
-  optional<time::nanoseconds> expires;
+  std::optional<time::nanoseconds> expires;
   if (parameters.hasExpirationPeriod() &&
       parameters.getExpirationPeriod() != time::milliseconds::max()) {
     expires = time::duration_cast<time::nanoseconds>(parameters.getExpirationPeriod());
@@ -261,12 +261,11 @@
   route.faceId = parameters.getFaceId();
   route.origin = parameters.getOrigin();
 
-  beginRemoveRoute(parameters.getName(), route, [] (RibUpdateResult) {});
+  beginRemoveRoute(parameters.getName(), route, [] (auto&&...) {});
 }
 
 void
-RibManager::listEntries(const Name&, const Interest& interest,
-                        ndn::mgmt::StatusDatasetContext& context)
+RibManager::listEntries(const Name&, const Interest&, ndn::mgmt::StatusDatasetContext& context)
 {
   auto now = time::steady_clock::now();
   for (const auto& kv : m_rib) {
@@ -363,7 +362,7 @@
     [=] (const Data&) {
       Route route(pa, faceId);
       route.expires = std::min(route.annExpires, time::steady_clock::now() + maxLifetime);
-      beginAddRoute(pa.getAnnouncedName(), route, nullopt,
+      beginAddRoute(pa.getAnnouncedName(), route, std::nullopt,
         [=] (RibUpdateResult ribRes) {
           auto res = getSlAnnounceResultFromRibUpdateResult(ribRes);
           NFD_LOG_INFO("slAnnounce " << pa.getAnnouncedName() << " " << faceId << ": " << res);
@@ -395,7 +394,7 @@
 
   Route route = *oldRoute;
   route.expires = std::min(route.annExpires, time::steady_clock::now() + maxLifetime);
-  beginAddRoute(routeName, route, nullopt,
+  beginAddRoute(routeName, route, std::nullopt,
     [=] (RibUpdateResult ribRes) {
       auto res = getSlAnnounceResultFromRibUpdateResult(ribRes);
       NFD_LOG_INFO("slRenew " << name << " " << faceId << ": " << res << " " << routeName);
@@ -415,7 +414,7 @@
     entry = m_rib.findParent(name);
   }
   if (entry == nullptr) {
-    return cb(nullopt);
+    return cb(std::nullopt);
   }
 
   auto pa = entry->getPrefixAnnouncement();
diff --git a/daemon/mgmt/rib-manager.hpp b/daemon/mgmt/rib-manager.hpp
index 98739f0..ac2a324 100644
--- a/daemon/mgmt/rib-manager.hpp
+++ b/daemon/mgmt/rib-manager.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -99,7 +99,7 @@
   };
 
   using SlAnnounceCallback = std::function<void(SlAnnounceResult res)>;
-  using SlFindAnnCallback = std::function<void(optional<ndn::PrefixAnnouncement>)>;
+  using SlFindAnnCallback = std::function<void(std::optional<ndn::PrefixAnnouncement>)>;
 
   /** \brief Insert a route by prefix announcement from self-learning strategy.
    *  \param pa A prefix announcement. It must contain the Data.
@@ -176,7 +176,7 @@
    *  \param done completion callback
    */
   void
-  beginAddRoute(const Name& name, rib::Route route, optional<time::nanoseconds> expires,
+  beginAddRoute(const Name& name, rib::Route route, std::optional<time::nanoseconds> expires,
                 const std::function<void(RibUpdateResult)>& done);
 
   /** \brief Start removing a route from RIB and FIB.
diff --git a/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.cpp b/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.cpp
index ca54132..7aff618 100644
--- a/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.cpp
+++ b/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -28,14 +28,14 @@
 namespace nfd {
 namespace rib {
 
-optional<ReadvertiseAction>
+std::optional<ReadvertiseAction>
 ClientToNlsrReadvertisePolicy::handleNewRoute(const RibRouteRef& ribRoute) const
 {
   if (ribRoute.route->origin == ndn::nfd::ROUTE_ORIGIN_CLIENT) {
     return ReadvertiseAction{ribRoute.entry->getName(), ndn::security::SigningInfo()};
   }
   else {
-    return nullopt;
+    return std::nullopt;
   }
 }
 
diff --git a/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.hpp b/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.hpp
index b1c5e29..c0d5837 100644
--- a/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.hpp
+++ b/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -41,7 +41,7 @@
    *  If the route origin is "client" (typically from auto prefix propagation), readvertise it
    *  using the default signing identity.
    */
-  optional<ReadvertiseAction>
+  std::optional<ReadvertiseAction>
   handleNewRoute(const RibRouteRef& ribRoute) const override;
 
   time::milliseconds
diff --git a/daemon/rib/readvertise/host-to-gateway-readvertise-policy.cpp b/daemon/rib/readvertise/host-to-gateway-readvertise-policy.cpp
index 9ee7985..89f11fd 100644
--- a/daemon/rib/readvertise/host-to-gateway-readvertise-policy.cpp
+++ b/daemon/rib/readvertise/host-to-gateway-readvertise-policy.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -44,13 +44,13 @@
   m_refreshInterval = interval ? time::seconds(*interval) : DEFAULT_REFRESH_INTERVAL;
 }
 
-optional<ReadvertiseAction>
+std::optional<ReadvertiseAction>
 HostToGatewayReadvertisePolicy::handleNewRoute(const RibRouteRef& ribRoute) const
 {
   auto ribEntryName = ribRoute.entry->getName();
   if (scope_prefix::LOCALHOST.isPrefixOf(ribEntryName) ||
       ribEntryName == RibManager::LOCALHOP_TOP_PREFIX) {
-    return nullopt;
+    return std::nullopt;
   }
 
   // find out the shortest identity whose name is a prefix of the RIB entry name
@@ -73,12 +73,10 @@
     }
   }
 
-  if (isFound) {
-    return ReadvertiseAction{prefixToAdvertise, ndn::security::signingByIdentity(signingIdentity)};
+  if (!isFound) {
+    return std::nullopt;
   }
-  else {
-    return nullopt;
-  }
+  return ReadvertiseAction{prefixToAdvertise, ndn::security::signingByIdentity(signingIdentity)};
 }
 
 time::milliseconds
diff --git a/daemon/rib/readvertise/host-to-gateway-readvertise-policy.hpp b/daemon/rib/readvertise/host-to-gateway-readvertise-policy.hpp
index 325fc80..ac2491d 100644
--- a/daemon/rib/readvertise/host-to-gateway-readvertise-policy.hpp
+++ b/daemon/rib/readvertise/host-to-gateway-readvertise-policy.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -43,7 +43,7 @@
                                  const ConfigSection& section);
 
 public:
-  optional<ReadvertiseAction>
+  std::optional<ReadvertiseAction>
   handleNewRoute(const RibRouteRef& ribRoute) const override;
 
   time::milliseconds
diff --git a/daemon/rib/readvertise/readvertise-policy.hpp b/daemon/rib/readvertise/readvertise-policy.hpp
index 99deccb..da22139 100644
--- a/daemon/rib/readvertise/readvertise-policy.hpp
+++ b/daemon/rib/readvertise/readvertise-policy.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -51,7 +51,7 @@
 
   /** \brief decide whether to readvertise a route, and what prefix to readvertise
    */
-  virtual optional<ReadvertiseAction>
+  virtual std::optional<ReadvertiseAction>
   handleNewRoute(const RibRouteRef& ribRoute) const = 0;
 
   /** \return how often readvertisements made by this policy should be refreshed.
diff --git a/daemon/rib/readvertise/readvertise.cpp b/daemon/rib/readvertise/readvertise.cpp
index 2f16795..addad72 100644
--- a/daemon/rib/readvertise/readvertise.cpp
+++ b/daemon/rib/readvertise/readvertise.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -67,7 +67,7 @@
 void
 Readvertise::afterAddRoute(const RibRouteRef& ribRoute)
 {
-  optional<ReadvertiseAction> action = m_policy->handleNewRoute(ribRoute);
+  std::optional<ReadvertiseAction> action = m_policy->handleNewRoute(ribRoute);
   if (!action) {
     NFD_LOG_DEBUG("add-route " << ribRoute.entry->getName() << '(' << ribRoute.route->faceId <<
                   ',' << ribRoute.route->origin << ") not-readvertising");
diff --git a/daemon/rib/route.hpp b/daemon/rib/route.hpp
index 18df250..9b0bead 100644
--- a/daemon/rib/route.hpp
+++ b/daemon/rib/route.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -82,13 +82,13 @@
   ndn::nfd::RouteOrigin origin = ndn::nfd::ROUTE_ORIGIN_APP;
   uint64_t cost = 0;
   std::underlying_type_t<ndn::nfd::RouteFlags> flags = ndn::nfd::ROUTE_FLAGS_NONE;
-  optional<time::steady_clock::time_point> expires;
+  std::optional<time::steady_clock::time_point> expires;
 
   /** \brief The prefix announcement that caused the creation of this route.
    *
    *  This is nullopt if this route is not created by a prefix announcement.
    */
-  optional<ndn::PrefixAnnouncement> announcement;
+  std::optional<ndn::PrefixAnnouncement> announcement;
 
   /** \brief Expiration time of the prefix announcement.
    *
diff --git a/daemon/table/fib.hpp b/daemon/table/fib.hpp
index f5984aa..a4b688f 100644
--- a/daemon/table/fib.hpp
+++ b/daemon/table/fib.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -122,8 +122,8 @@
   removeNextHop(Entry& entry, const Face& face);
 
 public: // enumeration
-  typedef boost::transformed_range<name_tree::GetTableEntry<Entry>, const name_tree::Range> Range;
-  typedef boost::range_iterator<Range>::type const_iterator;
+  using Range = boost::transformed_range<name_tree::GetTableEntry<Entry>, const name_tree::Range>;
+  using const_iterator = boost::range_iterator<Range>::type;
 
   /** \return an iterator to the beginning
    *  \note The iteration order is implementation-defined.
diff --git a/daemon/table/name-tree-hashtable.cpp b/daemon/table/name-tree-hashtable.cpp
index 30e4ca3..fc17523 100644
--- a/daemon/table/name-tree-hashtable.cpp
+++ b/daemon/table/name-tree-hashtable.cpp
@@ -52,9 +52,10 @@
   }
 };
 
-/** \brief a type with compute static method to compute hash value from a raw buffer
+/**
+ * \brief A type with a `compute()` static method to compute the hash value from a raw buffer
  */
-using HashFunc = std::conditional<(sizeof(HashValue) > 4), Hash64, Hash32>::type;
+using HashFunc = std::conditional_t<(sizeof(HashValue) > 4), Hash64, Hash32>;
 
 HashValue
 computeHash(const Name& name, size_t prefixLen)
diff --git a/daemon/table/name-tree-hashtable.hpp b/daemon/table/name-tree-hashtable.hpp
index ec5caa0..2880984 100644
--- a/daemon/table/name-tree-hashtable.hpp
+++ b/daemon/table/name-tree-hashtable.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2017,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -124,19 +124,19 @@
 
   /** \brief if hashtable has more than nBuckets*expandLoadFactor nodes, it will be expanded
    */
-  float expandLoadFactor = 0.5;
+  float expandLoadFactor = 0.5f;
 
   /** \brief when hashtable is expanded, its new size is nBuckets*expandFactor
    */
-  float expandFactor = 2.0;
+  float expandFactor = 2.0f;
 
   /** \brief if hashtable has less than nBuckets*shrinkLoadFactor nodes, it will be shrunk
    */
-  float shrinkLoadFactor = 0.1;
+  float shrinkLoadFactor = 0.1f;
 
   /** \brief when hashtable is shrunk, its new size is max(nBuckets*shrinkFactor, minSize)
    */
-  float shrinkFactor = 0.5;
+  float shrinkFactor = 0.5f;
 };
 
 /** \brief a hashtable for fast exact name lookup
@@ -149,7 +149,7 @@
 class Hashtable
 {
 public:
-  typedef HashtableOptions Options;
+  using Options = HashtableOptions;
 
   explicit
   Hashtable(const Options& options);
diff --git a/daemon/table/strategy-choice.hpp b/daemon/table/strategy-choice.hpp
index 4b1548e..8c810a4 100644
--- a/daemon/table/strategy-choice.hpp
+++ b/daemon/table/strategy-choice.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -106,7 +106,7 @@
     Status m_status;
     std::string m_exceptionMessage;
 
-    friend class StrategyChoice;
+    friend StrategyChoice;
     friend std::ostream& operator<<(std::ostream&, const InsertResult&);
   };
 
@@ -152,8 +152,8 @@
   findEffectiveStrategy(const measurements::Entry& measurementsEntry) const;
 
 public: // enumeration
-  typedef boost::transformed_range<name_tree::GetTableEntry<Entry>, const name_tree::Range> Range;
-  typedef boost::range_iterator<Range>::type const_iterator;
+  using Range = boost::transformed_range<name_tree::GetTableEntry<Entry>, const name_tree::Range>;
+  using const_iterator = boost::range_iterator<Range>::type;
 
   /** \return an iterator to the beginning
    *  \note Iteration order is implementation-defined.
diff --git a/daemon/table/strategy-info-host.hpp b/daemon/table/strategy-info-host.hpp
index 03f42f4..9204575 100644
--- a/daemon/table/strategy-info-host.hpp
+++ b/daemon/table/strategy-info-host.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,8 @@
 
 #include "fw/strategy-info.hpp"
 
+#include <unordered_map>
+
 namespace nfd {
 
 /** \brief Base class for an entity onto which StrategyInfo items may be placed
@@ -43,8 +45,7 @@
   T*
   getStrategyInfo() const
   {
-    static_assert(std::is_base_of<fw::StrategyInfo, T>::value,
-                  "T must inherit from StrategyInfo");
+    static_assert(std::is_base_of_v<fw::StrategyInfo, T>);
 
     auto it = m_items.find(T::getTypeId());
     if (it == m_items.end()) {
@@ -62,8 +63,7 @@
   std::pair<T*, bool>
   insertStrategyInfo(A&&... args)
   {
-    static_assert(std::is_base_of<fw::StrategyInfo, T>::value,
-                  "T must inherit from StrategyInfo");
+    static_assert(std::is_base_of_v<fw::StrategyInfo, T>);
 
     auto& item = m_items[T::getTypeId()];
     bool isNew = item == nullptr;
@@ -81,8 +81,7 @@
   size_t
   eraseStrategyInfo()
   {
-    static_assert(std::is_base_of<fw::StrategyInfo, T>::value,
-                  "T must inherit from StrategyInfo");
+    static_assert(std::is_base_of_v<fw::StrategyInfo, T>);
 
     return m_items.erase(T::getTypeId());
   }
diff --git a/tests/daemon/face/channel-fixture.hpp b/tests/daemon/face/channel-fixture.hpp
index 31a9439..c3d07c6 100644
--- a/tests/daemon/face/channel-fixture.hpp
+++ b/tests/daemon/face/channel-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -43,8 +43,7 @@
 template<class ChannelT, class EndpointT>
 class ChannelFixture : public GlobalIoFixture
 {
-  static_assert(std::is_base_of<Channel, ChannelT>::value,
-                "ChannelFixture must be instantiated with a type derived from Channel");
+  static_assert(std::is_base_of_v<Channel, ChannelT>);
 
 public:
   virtual
@@ -71,14 +70,15 @@
   }
 
   virtual shared_ptr<ChannelT>
-  makeChannel(const boost::asio::ip::address&, uint16_t port = 0, optional<size_t> mtu = nullopt)
+  makeChannel(const boost::asio::ip::address&, uint16_t port = 0,
+              std::optional<size_t> mtu = std::nullopt)
   {
     BOOST_FAIL("Unimplemented");
     return nullptr;
   }
 
   void
-  listen(const boost::asio::ip::address& addr, optional<size_t> mtu = nullopt)
+  listen(const boost::asio::ip::address& addr, std::optional<size_t> mtu = std::nullopt)
   {
     listenerEp = EndpointT{addr, 7030};
     listenerChannel = makeChannel(addr, 7030, mtu);
diff --git a/tests/daemon/face/face.t.cpp b/tests/daemon/face/face.t.cpp
index 641088f..bcaa90a 100644
--- a/tests/daemon/face/face.t.cpp
+++ b/tests/daemon/face/face.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -114,7 +114,7 @@
   }
 
   for (size_t i = 0; i < nInNacks; ++i) {
-    face1->receiveNack(makeNack(*makeInterest("/StnEVTj4Ex", false, nullopt, 561),
+    face1->receiveNack(makeNack(*makeInterest("/StnEVTj4Ex", false, std::nullopt, 561),
                                 lp::NackReason::CONGESTION), 0);
   }
 
@@ -127,7 +127,7 @@
   }
 
   for (size_t i = 0; i < nOutNacks; ++i) {
-    face1->sendNack(makeNack(*makeInterest("/9xK6FbwIBM", false, nullopt, 365),
+    face1->sendNack(makeNack(*makeInterest("/9xK6FbwIBM", false, std::nullopt, 365),
                              lp::NackReason::CONGESTION));
   }
 
diff --git a/tests/daemon/face/factory-test-common.hpp b/tests/daemon/face/factory-test-common.hpp
index f92d388..4e65d34 100644
--- a/tests/daemon/face/factory-test-common.hpp
+++ b/tests/daemon/face/factory-test-common.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -44,7 +44,7 @@
 inline void
 createFace(ProtocolFactory& factory,
            const FaceUri& remoteUri,
-           const optional<FaceUri>& localUri,
+           const std::optional<FaceUri>& localUri,
            const FaceParams& params,
            const CreateFaceExpectedResult& expected,
            const std::function<void(const Face&)>& extraChecks = nullptr)
diff --git a/tests/daemon/face/generic-link-service.t.cpp b/tests/daemon/face/generic-link-service.t.cpp
index 219154e..11aeeb8 100644
--- a/tests/daemon/face/generic-link-service.t.cpp
+++ b/tests/daemon/face/generic-link-service.t.cpp
@@ -193,7 +193,7 @@
   options.allowLocalFields = false;
   initialize(options);
 
-  auto nack1 = makeNack(*makeInterest("/localhost/test", false, nullopt, 323),
+  auto nack1 = makeNack(*makeInterest("/localhost/test", false, std::nullopt, 323),
                         lp::NackReason::NO_ROUTE);
   face->sendNack(nack1);
 
@@ -282,7 +282,7 @@
   options.allowLocalFields = false;
   initialize(options);
 
-  lp::Nack nack1 = makeNack(*makeInterest("/localhost/test", false, nullopt, 323),
+  lp::Nack nack1 = makeNack(*makeInterest("/localhost/test", false, std::nullopt, 323),
                             lp::NackReason::NO_ROUTE);
   lp::Packet lpPacket;
   lpPacket.set<lp::FragmentField>(std::make_pair(
@@ -538,7 +538,7 @@
   options.reliabilityOptions.isEnabled = true;
   initialize(options);
 
-  auto nack1 = makeNack(*makeInterest("/localhost/test", false, nullopt, 323),
+  auto nack1 = makeNack(*makeInterest("/localhost/test", false, std::nullopt, 323),
                         lp::NackReason::NO_ROUTE);
   face->sendNack(nack1);
 
@@ -970,7 +970,7 @@
   options.allowLocalFields = true;
   initialize(options);
 
-  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, nullopt, 123),
+  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, std::nullopt, 123),
                            lp::NackReason::NO_ROUTE);
   lp::Packet packet;
   packet.set<lp::FragmentField>(std::make_pair(
@@ -1030,7 +1030,7 @@
   options.allowLocalFields = true;
   initialize(options);
 
-  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, nullopt, 123),
+  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, std::nullopt, 123),
                            lp::NackReason::NO_ROUTE);
   lp::Packet packet(nack.getInterest().wireEncode());
   packet.set<lp::NackField>(nack.getHeader());
@@ -1122,7 +1122,7 @@
   options.allowLocalFields = true;
   initialize(options);
 
-  lp::Nack nack = makeNack(*makeInterest("/TPAhdiHz", false, nullopt, 278),
+  lp::Nack nack = makeNack(*makeInterest("/TPAhdiHz", false, std::nullopt, 278),
                            lp::NackReason::CONGESTION);
   lp::Packet packet(nack.getInterest().wireEncode());
   packet.set<lp::NackField>(nack.getHeader());
@@ -1163,7 +1163,7 @@
 
 BOOST_AUTO_TEST_CASE(SendCongestionMarkNack)
 {
-  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, nullopt, 123),
+  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, std::nullopt, 123),
                            lp::NackReason::NO_ROUTE);
   nack.setTag(make_shared<lp::CongestionMarkTag>(std::numeric_limits<uint64_t>::max()));
 
@@ -1205,7 +1205,7 @@
 
 BOOST_AUTO_TEST_CASE(ReceiveCongestionMarkNack)
 {
-  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, nullopt, 123),
+  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, std::nullopt, 123),
                            lp::NackReason::NO_ROUTE);
   lp::Packet packet;
   packet.set<lp::FragmentField>(std::make_pair(
@@ -1310,7 +1310,7 @@
   options.allowSelfLearning = true;
   initialize(options);
 
-  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, nullopt, 123),
+  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, std::nullopt, 123),
                            lp::NackReason::NO_ROUTE);
   lp::Packet packet;
   packet.set<lp::FragmentField>(std::make_pair(
@@ -1418,7 +1418,7 @@
   options.allowSelfLearning = true;
   initialize(options);
 
-  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, nullopt, 123),
+  lp::Nack nack = makeNack(*makeInterest("/localhost/test", false, std::nullopt, 123),
                            lp::NackReason::NO_ROUTE);
   lp::Packet packet;
   packet.set<lp::FragmentField>(std::make_pair(
diff --git a/tests/daemon/face/lp-reliability.t.cpp b/tests/daemon/face/lp-reliability.t.cpp
index e3a84c9..526708f 100644
--- a/tests/daemon/face/lp-reliability.t.cpp
+++ b/tests/daemon/face/lp-reliability.t.cpp
@@ -33,6 +33,7 @@
 #include "dummy-transport.hpp"
 
 #include <cstring>
+#include <unordered_set>
 
 namespace nfd {
 namespace face {
diff --git a/tests/daemon/face/tcp-channel-fixture.hpp b/tests/daemon/face/tcp-channel-fixture.hpp
index ca0f28e..ab8d431 100644
--- a/tests/daemon/face/tcp-channel-fixture.hpp
+++ b/tests/daemon/face/tcp-channel-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -44,7 +44,8 @@
   }
 
   shared_ptr<TcpChannel>
-  makeChannel(const boost::asio::ip::address& addr, uint16_t port = 0, optional<size_t> mtu = nullopt) final
+  makeChannel(const boost::asio::ip::address& addr, uint16_t port = 0,
+              std::optional<size_t> mtu = std::nullopt) final
   {
     if (port == 0)
       port = getNextPort();
diff --git a/tests/daemon/face/test-netif.cpp b/tests/daemon/face/test-netif.cpp
index d97ce47..36719ad 100644
--- a/tests/daemon/face/test-netif.cpp
+++ b/tests/daemon/face/test-netif.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -44,7 +44,7 @@
 std::vector<shared_ptr<const NetworkInterface>>
 collectNetworkInterfaces(bool allowCached)
 {
-  static optional<std::vector<shared_ptr<const NetworkInterface>>> cached;
+  static std::optional<std::vector<shared_ptr<const NetworkInterface>>> cached;
   if (!allowCached || !cached) {
     NetworkMonitor netmon(getGlobalIoService());
     cached = enumerateNetworkInterfaces(netmon);
diff --git a/tests/daemon/face/udp-channel-fixture.hpp b/tests/daemon/face/udp-channel-fixture.hpp
index 6f57b90..ac30738 100644
--- a/tests/daemon/face/udp-channel-fixture.hpp
+++ b/tests/daemon/face/udp-channel-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -39,12 +39,14 @@
 {
 protected:
   shared_ptr<UdpChannel>
-  makeChannel(const boost::asio::ip::address& addr, uint16_t port = 0, optional<size_t> mtu = nullopt) final
+  makeChannel(const boost::asio::ip::address& addr, uint16_t port = 0,
+              std::optional<size_t> mtu = std::nullopt) final
   {
     if (port == 0)
       port = getNextPort();
 
-    return std::make_shared<UdpChannel>(udp::Endpoint(addr, port), 2_s, false, mtu.value_or(ndn::MAX_NDN_PACKET_SIZE));
+    return std::make_shared<UdpChannel>(udp::Endpoint(addr, port), 2_s, false,
+                                        mtu.value_or(ndn::MAX_NDN_PACKET_SIZE));
   }
 
   void
diff --git a/tests/daemon/face/websocket-channel-fixture.hpp b/tests/daemon/face/websocket-channel-fixture.hpp
index 3072992..62c717b 100644
--- a/tests/daemon/face/websocket-channel-fixture.hpp
+++ b/tests/daemon/face/websocket-channel-fixture.hpp
@@ -39,7 +39,7 @@
 protected:
   shared_ptr<WebSocketChannel>
   makeChannel(const boost::asio::ip::address& addr, uint16_t port = 0,
-              optional<size_t> mtu = nullopt) final
+              std::optional<size_t> mtu = std::nullopt) final
   {
     if (port == 0)
       port = getNextPort();
diff --git a/tests/daemon/fw/algorithm.t.cpp b/tests/daemon/fw/algorithm.t.cpp
index 4a86d78..d0bd2f0 100644
--- a/tests/daemon/fw/algorithm.t.cpp
+++ b/tests/daemon/fw/algorithm.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -155,7 +155,7 @@
   auto face2 = make_shared<DummyFace>();
   auto face3 = make_shared<DummyFace>();
 
-  auto interest = makeInterest("/totzXG0d", false, nullopt, 29321);
+  auto interest = makeInterest("/totzXG0d", false, std::nullopt, 29321);
   pit::Entry entry(*interest);
   BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), false);
 
diff --git a/tests/daemon/fw/choose-strategy.hpp b/tests/daemon/fw/choose-strategy.hpp
index 0da7b84..cfb5ee6 100644
--- a/tests/daemon/fw/choose-strategy.hpp
+++ b/tests/daemon/fw/choose-strategy.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -48,7 +48,7 @@
  *  \return a reference to the strategy
  */
 template<typename S>
-typename std::enable_if<std::is_base_of<fw::Strategy, S>::value, S&>::type
+std::enable_if_t<std::is_base_of_v<fw::Strategy, S>, S&>
 choose(Forwarder& forwarder, const Name& prefix = "/",
        const Name& instanceName = S::getStrategyName())
 {
diff --git a/tests/daemon/fw/forwarder.t.cpp b/tests/daemon/fw/forwarder.t.cpp
index 5fb2776..eef2cea 100644
--- a/tests/daemon/fw/forwarder.t.cpp
+++ b/tests/daemon/fw/forwarder.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -160,17 +160,17 @@
   auto face2 = addFace();
 
   Pit& pit = forwarder.getPit();
-  auto interestA1 = makeInterest("/A", false, nullopt, 8378);
+  auto interestA1 = makeInterest("/A", false, std::nullopt, 8378);
   auto pitA = pit.insert(*interestA1).first;
   pitA->insertOrUpdateInRecord(*face1, *interestA1);
 
-  auto interestA2 = makeInterest("/A", false, nullopt, 1698);
+  auto interestA2 = makeInterest("/A", false, std::nullopt, 1698);
   auto outA2 = forwarder.onOutgoingInterest(*interestA2, *face2, pitA);
   BOOST_REQUIRE(outA2 != nullptr);
   BOOST_CHECK_EQUAL(outA2->getLastNonce(), 1698);
 
   // This packet will be dropped because HopLimit=0
-  auto interestA3 = makeInterest("/A", false, nullopt, 9876);
+  auto interestA3 = makeInterest("/A", false, std::nullopt, 9876);
   interestA3->setHopLimit(0);
   auto outA3 = forwarder.onOutgoingInterest(*interestA3, *face2, pitA);
   BOOST_CHECK(outA3 == nullptr);
@@ -468,10 +468,10 @@
   Pit& pit = forwarder.getPit();
 
   // dispatch to the correct strategy
-  auto interest1 = makeInterest("/A/AYJqayrzF", false, nullopt, 562);
+  auto interest1 = makeInterest("/A/AYJqayrzF", false, std::nullopt, 562);
   auto pit1 = pit.insert(*interest1).first;
   pit1->insertOrUpdateOutRecord(*face1, *interest1);
-  auto interest2 = makeInterest("/B/EVyP73ru", false, nullopt, 221);
+  auto interest2 = makeInterest("/B/EVyP73ru", false, std::nullopt, 221);
   auto pit2 = pit.insert(*interest2).first;
   pit2->insertOrUpdateOutRecord(*face1, *interest2);
 
@@ -496,7 +496,7 @@
   BOOST_CHECK_EQUAL(outRecord1->getIncomingNack()->getReason(), lp::NackReason::CONGESTION);
 
   // drop if no PIT entry
-  auto nack3 = makeNack(*makeInterest("/yEcw5HhdM", false, nullopt, 243), lp::NackReason::CONGESTION);
+  auto nack3 = makeNack(*makeInterest("/yEcw5HhdM", false, std::nullopt, 243), lp::NackReason::CONGESTION);
   strategyA.afterReceiveNack_count = 0;
   strategyB.afterReceiveNack_count = 0;
   forwarder.onIncomingNack(nack3, FaceEndpoint(*face1, 0));
@@ -504,7 +504,7 @@
   BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
 
   // drop if no out-record
-  auto interest4 = makeInterest("/Etab4KpY", false, nullopt, 157);
+  auto interest4 = makeInterest("/Etab4KpY", false, std::nullopt, 157);
   auto pit4 = pit.insert(*interest4).first;
   pit4->insertOrUpdateOutRecord(*face1, *interest4);
 
@@ -516,7 +516,7 @@
   BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
 
   // drop if Nonce does not match out-record
-  auto nack4b = makeNack(*makeInterest("/Etab4KpY", false, nullopt, 294), lp::NackReason::CONGESTION);
+  auto nack4b = makeNack(*makeInterest("/Etab4KpY", false, std::nullopt, 294), lp::NackReason::CONGESTION);
   strategyA.afterReceiveNack_count = 0;
   strategyB.afterReceiveNack_count = 0;
   forwarder.onIncomingNack(nack4b, FaceEndpoint(*face1, 0));
@@ -549,7 +549,7 @@
   nackHeader.setReason(lp::NackReason::CONGESTION);
 
   // don't send Nack if there's no in-record
-  auto interest1 = makeInterest("/fM5IVEtC", false, nullopt, 719);
+  auto interest1 = makeInterest("/fM5IVEtC", false, std::nullopt, 719);
   auto pit1 = pit.insert(*interest1).first;
   pit1->insertOrUpdateInRecord(*face1, *interest1);
 
@@ -558,10 +558,10 @@
   BOOST_CHECK_EQUAL(face2->sentNacks.size(), 0);
 
   // send Nack with correct Nonce
-  auto interest2a = makeInterest("/Vi8tRm9MG3", false, nullopt, 152);
+  auto interest2a = makeInterest("/Vi8tRm9MG3", false, std::nullopt, 152);
   auto pit2 = pit.insert(*interest2a).first;
   pit2->insertOrUpdateInRecord(*face1, *interest2a);
-  auto interest2b = makeInterest("/Vi8tRm9MG3", false, nullopt, 808);
+  auto interest2b = makeInterest("/Vi8tRm9MG3", false, std::nullopt, 808);
   pit2->insertOrUpdateInRecord(*face2, *interest2b);
   face1->sentNacks.clear();
   face2->sentNacks.clear();
@@ -588,7 +588,7 @@
   BOOST_CHECK(inRecord2b == pit2->in_end());
 
   // don't send Nack to multi-access face
-  auto interest2c = makeInterest("/Vi8tRm9MG3", false, nullopt, 228);
+  auto interest2c = makeInterest("/Vi8tRm9MG3", false, std::nullopt, 228);
   pit2->insertOrUpdateInRecord(*face3, *interest2c);
 
   face3->sentNacks.clear();
@@ -596,7 +596,7 @@
   BOOST_CHECK_EQUAL(face3->sentNacks.size(), 0);
 
   // don't send Nack to face with invalid ID
-  auto interest1b = makeInterest("/fM5IVEtC", false, nullopt, 553);
+  auto interest1b = makeInterest("/fM5IVEtC", false, std::nullopt, 553);
   pit1->insertOrUpdateInRecord(*face4, *interest1b);
 
   face4->sentNacks.clear();
@@ -620,19 +620,19 @@
 
   // receive Interest on face1
   face1->sentNacks.clear();
-  auto interest1a = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, nullopt, 732);
+  auto interest1a = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, std::nullopt, 732);
   face1->receiveInterest(*interest1a, 0);
   BOOST_CHECK(face1->sentNacks.empty());
 
   // receive Interest with duplicate Nonce on face1: legit retransmission
   face1->sentNacks.clear();
-  auto interest1b = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, nullopt, 732);
+  auto interest1b = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, std::nullopt, 732);
   face1->receiveInterest(*interest1b, 0);
   BOOST_CHECK(face1->sentNacks.empty());
 
   // receive Interest with duplicate Nonce on face2
   face2->sentNacks.clear();
-  auto interest2a = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, nullopt, 732);
+  auto interest2a = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, std::nullopt, 732);
   face2->receiveInterest(*interest2a, 0);
   BOOST_REQUIRE_EQUAL(face2->sentNacks.size(), 1);
   BOOST_CHECK_EQUAL(face2->sentNacks.back().getInterest().wireEncode(), interest2a->wireEncode());
@@ -640,13 +640,13 @@
 
   // receive Interest with new Nonce on face2
   face2->sentNacks.clear();
-  auto interest2b = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, nullopt, 944);
+  auto interest2b = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, std::nullopt, 944);
   face2->receiveInterest(*interest2b, 0);
   BOOST_CHECK(face2->sentNacks.empty());
 
   // receive Interest with duplicate Nonce on face3, don't send Nack to multi-access face
   face3->sentNacks.clear();
-  auto interest3a = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, nullopt, 732);
+  auto interest3a = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", false, std::nullopt, 732);
   face3->receiveInterest(*interest3a, 0);
   BOOST_CHECK(face3->sentNacks.empty());
 }
diff --git a/tests/daemon/fw/strategy-nack-return.t.cpp b/tests/daemon/fw/strategy-nack-return.t.cpp
index 73db46c..a091fb5 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-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -97,8 +97,8 @@
   this->fib.addOrUpdateNextHop(fibEntry, *this->face4, 20);
   this->fib.addOrUpdateNextHop(fibEntry, *this->face5, 30);
 
-  auto interest1 = makeInterest("/McQYjMbm", false, nullopt, 992);
-  auto interest2 = makeInterest("/McQYjMbm", false, nullopt, 114);
+  auto interest1 = makeInterest("/McQYjMbm", false, std::nullopt, 992);
+  auto interest2 = makeInterest("/McQYjMbm", false, std::nullopt, 114);
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest1).first;
   pitEntry->insertOrUpdateInRecord(*this->face1, *interest1);
   pitEntry->insertOrUpdateInRecord(*this->face2, *interest2);
@@ -136,7 +136,7 @@
   this->fib.addOrUpdateNextHop(fibEntry, *this->face4, 20);
   this->fib.addOrUpdateNextHop(fibEntry, *this->face5, 30);
 
-  auto interest1 = makeInterest("/aS9FAyUV19", false, nullopt, 286);
+  auto interest1 = makeInterest("/aS9FAyUV19", false, std::nullopt, 286);
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest1).first;
   pitEntry->insertOrUpdateInRecord(*this->face1, *interest1);
   pitEntry->insertOrUpdateOutRecord(*this->face3, *interest1);
@@ -178,7 +178,7 @@
   pitEntry->insertOrUpdateOutRecord(*this->face3, *interest1);
 
   this->advanceClocks(300_ms);
-  auto interest2 = makeInterest("/sIYw0TXWDj", false, nullopt, 223);
+  auto interest2 = makeInterest("/sIYw0TXWDj", false, std::nullopt, 223);
   pitEntry->insertOrUpdateInRecord(*this->face1, *interest2);
   pitEntry->insertOrUpdateOutRecord(*this->face4, *interest2);
 
@@ -325,7 +325,7 @@
   fib.addOrUpdateNextHop(fibEntry, *face4, 20);
   fib.addOrUpdateNextHop(fibEntry, *face5, 30);
 
-  auto interest1 = makeInterest("/F6sEwB24I", false, nullopt, 282);
+  auto interest1 = makeInterest("/F6sEwB24I", false, std::nullopt, 282);
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest1).first;
   pitEntry->insertOrUpdateInRecord(*face1, *interest1);
   pitEntry->insertOrUpdateOutRecord(*face3, *interest1);
diff --git a/tests/daemon/fw/strategy-scope-control.t.cpp b/tests/daemon/fw/strategy-scope-control.t.cpp
index 6fd052e..86e9540 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-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -229,7 +229,7 @@
   this->fib.addOrUpdateNextHop(*fibEntry, *this->localFace4, 10);
   this->fib.addOrUpdateNextHop(*fibEntry, *this->nonLocalFace2, 20);
 
-  auto interest = makeInterest("/localhost/A/1", false, nullopt, 1460);
+  auto interest = makeInterest("/localhost/A/1", false, std::nullopt, 1460);
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*this->localFace3, *interest);
   lp::Nack nack = makeNack(*interest, lp::NackReason::NO_ROUTE);
@@ -254,7 +254,7 @@
   this->fib.addOrUpdateNextHop(*fibEntry, *this->localFace4, 10);
   this->fib.addOrUpdateNextHop(*fibEntry, *this->nonLocalFace2, 20);
 
-  auto interest = makeInterest("/localhop/A/1", false, nullopt, 1377);
+  auto interest = makeInterest("/localhop/A/1", false, std::nullopt, 1377);
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
   pitEntry->insertOrUpdateInRecord(*this->nonLocalFace1, *interest);
   lp::Nack nack = makeNack(*interest, lp::NackReason::NO_ROUTE);
diff --git a/tests/daemon/mgmt/face-manager-update-face.t.cpp b/tests/daemon/mgmt/face-manager-update-face.t.cpp
index 7b3859f..89031fd 100644
--- a/tests/daemon/mgmt/face-manager-update-face.t.cpp
+++ b/tests/daemon/mgmt/face-manager-update-face.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -54,8 +54,8 @@
   void
   createFace(const std::string& uri = "tcp4://127.0.0.1:26363",
              ndn::nfd::FacePersistency persistency = ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
-             optional<time::nanoseconds> baseCongestionMarkingInterval = nullopt,
-             optional<uint64_t> defaultCongestionThreshold = nullopt,
+             std::optional<time::nanoseconds> baseCongestionMarkingInterval = std::nullopt,
+             std::optional<uint64_t> defaultCongestionThreshold = std::nullopt,
              bool enableLocalFields = false,
              bool enableReliability = false,
              boost::logic::tribool enableCongestionMarking = boost::logic::indeterminate)
diff --git a/tests/daemon/mgmt/fib-manager.t.cpp b/tests/daemon/mgmt/fib-manager.t.cpp
index 048f76d..6131670 100644
--- a/tests/daemon/mgmt/fib-manager.t.cpp
+++ b/tests/daemon/mgmt/fib-manager.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -95,9 +95,9 @@
    */
   CheckNextHopResult
   checkNextHop(const Name& prefix,
-               optional<size_t> expectedNNextHops = nullopt,
-               optional<FaceId> faceId = nullopt,
-               optional<uint64_t> expectedCost = nullopt) const
+               std::optional<size_t> expectedNNextHops = std::nullopt,
+               std::optional<FaceId> faceId = std::nullopt,
+               std::optional<uint64_t> expectedCost = std::nullopt) const
   {
     const fib::Entry* entry = m_fib.findExactMatch(prefix);
     if (entry == nullptr) {
@@ -128,7 +128,7 @@
   FibManager m_manager;
 };
 
-std::ostream&
+static std::ostream&
 operator<<(std::ostream& os, FibManagerFixture::CheckNextHopResult result)
 {
   switch (result) {
@@ -163,7 +163,8 @@
                     CheckResponseResult::OK);
 
   // double check that the next hop was not added
-  BOOST_CHECK_EQUAL(checkNextHop("/hello", nullopt, nullopt, 101), CheckNextHopResult::NO_FIB_ENTRY);
+  BOOST_CHECK_EQUAL(checkNextHop("/hello", std::nullopt, std::nullopt, 101),
+                    CheckNextHopResult::NO_FIB_ENTRY);
 }
 
 BOOST_AUTO_TEST_CASE(NameTooLong)
@@ -388,12 +389,12 @@
   testRemoveNextHop(makeParameters("/hello", face2 + 100));
   BOOST_REQUIRE_EQUAL(m_responses.size(), 1); // face does not exist
   BOOST_CHECK_EQUAL(checkResponse(0, expectedName, expectedResponse), CheckResponseResult::OK);
-  BOOST_CHECK_EQUAL(checkNextHop("/hello", nullopt, face2 + 100), CheckNextHopResult::NO_NEXTHOP);
+  BOOST_CHECK_EQUAL(checkNextHop("/hello", std::nullopt, face2 + 100), CheckNextHopResult::NO_NEXTHOP);
 
   testRemoveNextHop(makeParameters("/hello", face2));
   BOOST_REQUIRE_EQUAL(m_responses.size(), 1); // record does not exist
   BOOST_CHECK_EQUAL(checkResponse(0, expectedName, expectedResponse), CheckResponseResult::OK);
-  BOOST_CHECK_EQUAL(checkNextHop("/hello", nullopt, face2), CheckNextHopResult::NO_NEXTHOP);
+  BOOST_CHECK_EQUAL(checkNextHop("/hello", std::nullopt, face2), CheckNextHopResult::NO_NEXTHOP);
 }
 
 BOOST_AUTO_TEST_SUITE_END() // RemoveNextHop
diff --git a/tests/daemon/mgmt/rib-manager-sl-announce.t.cpp b/tests/daemon/mgmt/rib-manager-sl-announce.t.cpp
index 597bad4..4d15659 100644
--- a/tests/daemon/mgmt/rib-manager-sl-announce.t.cpp
+++ b/tests/daemon/mgmt/rib-manager-sl-announce.t.cpp
@@ -91,7 +91,7 @@
   SlAnnounceResult
   slAnnounceSync(const ndn::PrefixAnnouncement& pa, uint64_t faceId, time::milliseconds maxLifetime)
   {
-    optional<SlAnnounceResult> result;
+    std::optional<SlAnnounceResult> result;
     manager->slAnnounce(pa, faceId, maxLifetime,
       [&] (RibManager::SlAnnounceResult res) {
         BOOST_CHECK(!result);
@@ -108,7 +108,7 @@
   SlAnnounceResult
   slRenewSync(const Name& name, uint64_t faceId, time::milliseconds maxLifetime)
   {
-    optional<SlAnnounceResult> result;
+    std::optional<SlAnnounceResult> result;
     manager->slRenew(name, faceId, maxLifetime,
       [&] (RibManager::SlAnnounceResult res) {
         BOOST_CHECK(!result);
@@ -122,19 +122,19 @@
 
   /** \brief Invoke manager->slFindAnn and wait for result.
    */
-  optional<ndn::PrefixAnnouncement>
+  std::optional<ndn::PrefixAnnouncement>
   slFindAnnSync(const Name& name)
   {
-    optional<optional<ndn::PrefixAnnouncement>> result;
+    std::optional<std::optional<ndn::PrefixAnnouncement>> result;
     manager->slFindAnn(name,
-      [&] (optional<ndn::PrefixAnnouncement> found) {
+      [&] (std::optional<ndn::PrefixAnnouncement> found) {
         BOOST_CHECK(!result);
         result = found;
       });
 
     g_io.poll();
     BOOST_CHECK(result);
-    return result.value_or(nullopt);
+    return result.value_or(std::nullopt);
   }
 
   /** \brief Lookup a route with PREFIXANN origin.
diff --git a/tests/daemon/mgmt/rib-manager.t.cpp b/tests/daemon/mgmt/rib-manager.t.cpp
index d23eb70..682eb30 100644
--- a/tests/daemon/mgmt/rib-manager.t.cpp
+++ b/tests/daemon/mgmt/rib-manager.t.cpp
@@ -448,7 +448,7 @@
     rib::Route route;
     route.faceId = ++faceId;
     route.cost = route.faceId * 10;
-    route.expires = nullopt;
+    route.expires = std::nullopt;
     return route;
   };
 
diff --git a/tests/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.t.cpp b/tests/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.t.cpp
index 6b67702..b804725 100644
--- a/tests/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.t.cpp
+++ b/tests/daemon/rib/readvertise/client-to-nlsr-readvertise-policy.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -47,7 +47,7 @@
   RibRouteRef rrr{entry, routeIt};
 
   ClientToNlsrReadvertisePolicy policy;
-  optional<ReadvertiseAction> action = policy.handleNewRoute(rrr);
+  std::optional<ReadvertiseAction> action = policy.handleNewRoute(rrr);
 
   BOOST_REQUIRE(action);
   BOOST_CHECK_EQUAL(action->prefix, "/test/A");
@@ -64,7 +64,7 @@
   RibRouteRef rrr{entry, routeIt};
 
   ClientToNlsrReadvertisePolicy policy;
-  optional<ReadvertiseAction> action = policy.handleNewRoute(rrr);
+  std::optional<ReadvertiseAction> action = policy.handleNewRoute(rrr);
 
   BOOST_CHECK(!action);
 }
diff --git a/tests/daemon/rib/readvertise/host-to-gateway-readvertise-policy.t.cpp b/tests/daemon/rib/readvertise/host-to-gateway-readvertise-policy.t.cpp
index c0d088a..c3682dd 100644
--- a/tests/daemon/rib/readvertise/host-to-gateway-readvertise-policy.t.cpp
+++ b/tests/daemon/rib/readvertise/host-to-gateway-readvertise-policy.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -65,7 +65,7 @@
   BOOST_REQUIRE(m_keyChain.createIdentity("/A/B"));
   BOOST_REQUIRE(m_keyChain.createIdentity("/C/nrd"));
 
-  auto test = [this] (Name routeName, optional<ReadvertiseAction> expectedAction) {
+  auto test = [this] (Name routeName, std::optional<ReadvertiseAction> expectedAction) {
     auto policy = makePolicy();
     auto action = policy->handleNewRoute(makeNewRoute(routeName));
 
@@ -79,7 +79,7 @@
     }
   };
 
-  test("/D/app", nullopt);
+  test("/D/app", std::nullopt);
   test("/A/B/app", ReadvertiseAction{"/A", ndn::security::signingByIdentity("/A")});
   test("/C/nrd", ReadvertiseAction{"/C", ndn::security::signingByIdentity("/C/nrd")});
 }
diff --git a/tests/daemon/rib/readvertise/readvertise.t.cpp b/tests/daemon/rib/readvertise/readvertise.t.cpp
index 89ae410..8916c00 100644
--- a/tests/daemon/rib/readvertise/readvertise.t.cpp
+++ b/tests/daemon/rib/readvertise/readvertise.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -43,7 +43,7 @@
 class DummyReadvertisePolicy : public ReadvertisePolicy
 {
 public:
-  optional<ReadvertiseAction>
+  std::optional<ReadvertiseAction>
   handleNewRoute(const RibRouteRef&) const override
   {
     return this->decision;
@@ -56,7 +56,7 @@
   }
 
 public:
-  optional<ReadvertiseAction> decision;
+  std::optional<ReadvertiseAction> decision;
 };
 
 class DummyReadvertiseDestination : public ReadvertiseDestination
@@ -196,7 +196,7 @@
 
 BOOST_AUTO_TEST_CASE(NoAdvertise)
 {
-  policy->decision = nullopt;
+  policy->decision = std::nullopt;
 
   this->insertRoute("/A/1", 1, ndn::nfd::ROUTE_ORIGIN_CLIENT);
   this->insertRoute("/A/2", 1, ndn::nfd::ROUTE_ORIGIN_CLIENT);
diff --git a/tests/daemon/rib/rib.t.cpp b/tests/daemon/rib/rib.t.cpp
index 7de4ebe..cc96e79 100644
--- a/tests/daemon/rib/rib.t.cpp
+++ b/tests/daemon/rib/rib.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -300,17 +300,17 @@
 
   Route root = createRoute(1, 20);
   Name name1("/");
-  root.expires = nullopt;
+  root.expires = std::nullopt;
   rib.insert(name1, root);
 
   Route route1 = createRoute(2, 20);
   Name name2("/hello");
-  route1.expires = nullopt;
+  route1.expires = std::nullopt;
   rib.insert(name2, route1);
 
   Route route2 = createRoute(3, 20);
   Name name3("/hello/world");
-  route2.expires = nullopt;
+  route2.expires = std::nullopt;
   rib.insert(name3, route2);
 
   const std::string ribStr = std::string(R"TEXT(
diff --git a/tests/daemon/rib/route.t.cpp b/tests/daemon/rib/route.t.cpp
index b6e0ddb..011ce7e 100644
--- a/tests/daemon/rib/route.t.cpp
+++ b/tests/daemon/rib/route.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -118,9 +118,9 @@
   BOOST_CHECK_NE(a, b);
   a.cost = 103;
 
-  b.expires = nullopt;
+  b.expires = std::nullopt;
   BOOST_CHECK_NE(a, b);
-  a.expires = nullopt;
+  a.expires = std::nullopt;
 
   BOOST_CHECK_EQUAL(a, b);
 }
@@ -149,7 +149,7 @@
                     "Route(faceid: 4980, origin: static, cost: 2312, flags: 0x1, expires in: "
                     "791214234 milliseconds)");
 
-  r.expires = nullopt;
+  r.expires = std::nullopt;
   BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(r),
                     "Route(faceid: 4980, origin: static, cost: 2312, flags: 0x1, never expires)");
 
diff --git a/tests/daemon/table/cs-fixture.hpp b/tests/daemon/table/cs-fixture.hpp
index 0dced9c..82fbb7e 100644
--- a/tests/daemon/table/cs-fixture.hpp
+++ b/tests/daemon/table/cs-fixture.hpp
@@ -92,12 +92,12 @@
   size_t
   erase(const Name& prefix, size_t limit)
   {
-    optional<size_t> nErased;
-    cs.erase(prefix, limit, [&] (size_t nErased1) { nErased = nErased1; });
+    std::optional<size_t> nErased;
+    cs.erase(prefix, limit, [&] (size_t n) { nErased = n; });
 
     // current Cs::erase implementation is synchronous
     // if callback was not invoked, bad_optional_access would occur
-    return *nErased;
+    return nErased.value();
   }
 
 protected:
diff --git a/tests/daemon/table/name-tree.t.cpp b/tests/daemon/table/name-tree.t.cpp
index d51474d..2649834 100644
--- a/tests/daemon/table/name-tree.t.cpp
+++ b/tests/daemon/table/name-tree.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,8 @@
 #include "tests/test-common.hpp"
 #include "tests/daemon/global-io-fixture.hpp"
 
+#include <unordered_set>
+
 namespace nfd {
 namespace name_tree {
 namespace tests {
diff --git a/tests/daemon/table/pit-entry.t.cpp b/tests/daemon/table/pit-entry.t.cpp
index d5b71fc..6f97a1c 100644
--- a/tests/daemon/table/pit-entry.t.cpp
+++ b/tests/daemon/table/pit-entry.t.cpp
@@ -51,7 +51,7 @@
   auto interest1 = makeInterest("/B");
   BOOST_CHECK_EQUAL(entry.canMatch(*interest1), false);
 
-  auto interest2 = makeInterest("/A", false, nullopt, 27956);
+  auto interest2 = makeInterest("/A", false, std::nullopt, 27956);
   BOOST_CHECK_EQUAL(entry.canMatch(*interest2), true);
 
   auto interest3 = makeInterest("/A", false, 6210_ms);
diff --git a/tests/daemon/table/pit.t.cpp b/tests/daemon/table/pit.t.cpp
index ca9ac3c..03438d4 100644
--- a/tests/daemon/table/pit.t.cpp
+++ b/tests/daemon/table/pit.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -70,7 +70,7 @@
   bool isNew = false;
 
   // base
-  auto interestA = makeInterest(name1, false, nullopt, 2148);
+  auto interestA = makeInterest(name1, false, std::nullopt, 2148);
   std::tie(entry, isNew) = pit.insert(*interestA);
   BOOST_CHECK_EQUAL(isNew, true);
   BOOST_CHECK_EQUAL(pit.size(), 1);
diff --git a/tests/other/fw/congestion-mark-strategy.cpp b/tests/other/fw/congestion-mark-strategy.cpp
index d21fc6f..3d920c7 100644
--- a/tests/other/fw/congestion-mark-strategy.cpp
+++ b/tests/other/fw/congestion-mark-strategy.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -43,7 +43,7 @@
         "Second parameter to CongestionMarkStrategy must be either 'true' or 'false'"));
     }
     m_shouldPreserveMark = parsed.parameters.at(1).toUri() == "true";
-    NDN_CXX_FALLTHROUGH;
+    [[fallthrough]];
   case 1:
     try {
       auto s = parsed.parameters.at(0).toUri();
@@ -55,7 +55,7 @@
       NDN_THROW(std::invalid_argument(
         "First parameter to CongestionMarkStrategy must be a non-negative integer"));
     }
-    NDN_CXX_FALLTHROUGH;
+    [[fallthrough]];
   case 0:
     break;
   default:
diff --git a/tests/test-common.cpp b/tests/test-common.cpp
index b57e804..7494c4b 100644
--- a/tests/test-common.cpp
+++ b/tests/test-common.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -29,15 +29,15 @@
 namespace tests {
 
 shared_ptr<Interest>
-makeInterest(const Name& name, bool canBePrefix, optional<time::milliseconds> lifetime,
-             optional<Interest::Nonce> nonce)
+makeInterest(const Name& name, bool canBePrefix, std::optional<time::milliseconds> lifetime,
+             std::optional<Interest::Nonce> nonce)
 {
   auto interest = std::make_shared<Interest>(name);
   interest->setCanBePrefix(canBePrefix);
   if (lifetime) {
     interest->setInterestLifetime(*lifetime);
   }
-  interest->setNonce(nonce);
+  interest->setNonce(nonce ? ndn::make_optional(*nonce) : ndn::nullopt);
   return interest;
 }
 
@@ -67,12 +67,12 @@
 
 ndn::PrefixAnnouncement
 makePrefixAnn(const Name& announcedName, time::milliseconds expiration,
-              optional<ndn::security::ValidityPeriod> validity)
+              std::optional<ndn::security::ValidityPeriod> validity)
 {
   ndn::PrefixAnnouncement pa;
   pa.setAnnouncedName(announcedName);
   pa.setExpiration(expiration);
-  pa.setValidityPeriod(validity);
+  pa.setValidityPeriod(validity ? ndn::make_optional(*validity) : ndn::nullopt);
   return pa;
 }
 
@@ -87,9 +87,9 @@
 
 ndn::PrefixAnnouncement
 signPrefixAnn(ndn::PrefixAnnouncement&& pa, ndn::KeyChain& keyChain,
-              const ndn::security::SigningInfo& si, optional<uint64_t> version)
+              const ndn::security::SigningInfo& si, std::optional<uint64_t> version)
 {
-  pa.toData(keyChain, si, version);
+  pa.toData(keyChain, si, version ? ndn::make_optional(*version) : ndn::nullopt);
   return std::move(pa);
 }
 
diff --git a/tests/test-common.hpp b/tests/test-common.hpp
index e25c6c9..beae58e 100644
--- a/tests/test-common.hpp
+++ b/tests/test-common.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -52,8 +52,8 @@
  */
 shared_ptr<Interest>
 makeInterest(const Name& name, bool canBePrefix = false,
-             optional<time::milliseconds> lifetime = nullopt,
-             optional<Interest::Nonce> nonce = nullopt);
+             std::optional<time::milliseconds> lifetime = std::nullopt,
+             std::optional<Interest::Nonce> nonce = std::nullopt);
 
 /**
  * \brief Create a Data with a null (i.e., empty) signature
@@ -105,7 +105,7 @@
  */
 ndn::PrefixAnnouncement
 makePrefixAnn(const Name& announcedName, time::milliseconds expiration,
-              optional<ndn::security::ValidityPeriod> validity = nullopt);
+              std::optional<ndn::security::ValidityPeriod> validity = std::nullopt);
 
 /**
  * \brief Create a prefix announcement without signing
@@ -123,7 +123,7 @@
 ndn::PrefixAnnouncement
 signPrefixAnn(ndn::PrefixAnnouncement&& pa, ndn::KeyChain& keyChain,
               const ndn::security::SigningInfo& si = ndn::security::SigningInfo(),
-              optional<uint64_t> version = nullopt);
+              std::optional<uint64_t> version = std::nullopt);
 
 } // namespace tests
 } // namespace nfd
diff --git a/tests/tools/mock-nfd-mgmt-fixture.hpp b/tests/tools/mock-nfd-mgmt-fixture.hpp
index 82ab19a..ec98657 100644
--- a/tests/tools/mock-nfd-mgmt-fixture.hpp
+++ b/tests/tools/mock-nfd-mgmt-fixture.hpp
@@ -64,11 +64,11 @@
    *  \retval nullopt last Interest is not the expected command
    *  \return command parameters
    */
-  static optional<ControlParameters>
+  static std::optional<ControlParameters>
   parseCommand(const Interest& interest, const Name& expectedPrefix)
   {
     if (!expectedPrefix.isPrefixOf(interest.getName())) {
-      return nullopt;
+      return std::nullopt;
     }
     return ControlParameters(interest.getName().at(expectedPrefix.size()).blockFromValue());
   }
diff --git a/tests/tools/ndn-autoconfig/multicast-discovery.t.cpp b/tests/tools/ndn-autoconfig/multicast-discovery.t.cpp
index 9a0f5ac..b71cc84 100644
--- a/tests/tools/ndn-autoconfig/multicast-discovery.t.cpp
+++ b/tests/tools/ndn-autoconfig/multicast-discovery.t.cpp
@@ -62,7 +62,7 @@
       return;
     }
 
-    optional<ControlParameters> req = parseCommand(interest, "/localhost/nfd/rib/register");
+    auto req = parseCommand(interest, "/localhost/nfd/rib/register");
     if (req) {
       BOOST_REQUIRE(req->hasName());
       BOOST_CHECK_EQUAL(req->getName(), "/localhop/ndn-autoconf/hub");
diff --git a/tests/tools/ndn-autoconfig/procedure.t.cpp b/tests/tools/ndn-autoconfig/procedure.t.cpp
index 760f8b0..a392da8 100644
--- a/tests/tools/ndn-autoconfig/procedure.t.cpp
+++ b/tests/tools/ndn-autoconfig/procedure.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -75,7 +75,7 @@
    *  \param io io_service to asynchronously post the result
    */
   DummyStage(const std::string& stageName, int* nCalls,
-             const optional<FaceUri>& result, boost::asio::io_service& io)
+             const std::optional<FaceUri>& result, boost::asio::io_service& io)
     : m_stageName(stageName)
     , m_nCalls(nCalls)
     , m_result(result)
@@ -109,7 +109,7 @@
 private:
   std::string m_stageName;
   int* m_nCalls;
-  optional<FaceUri> m_result;
+  std::optional<FaceUri> m_result;
   boost::asio::io_service& m_io;
 };
 
@@ -131,7 +131,7 @@
   makeStages(const Options& options) override
   {
     m_stages.push_back(make_unique<DummyStage>("first", &nCalls1, FaceUri("udp://188.7.60.95"), m_io));
-    m_stages.push_back(make_unique<DummyStage>("second", &nCalls2, nullopt, m_io));
+    m_stages.push_back(make_unique<DummyStage>("second", &nCalls2, std::nullopt, m_io));
   }
 
 public:
@@ -157,7 +157,7 @@
   void
   makeStages(const Options& options) override
   {
-    m_stages.push_back(make_unique<DummyStage>("first", &nCalls1, nullopt, m_io));
+    m_stages.push_back(make_unique<DummyStage>("first", &nCalls1, std::nullopt, m_io));
     m_stages.push_back(make_unique<DummyStage>("second", &nCalls2, FaceUri("tcp://40.23.174.71"), m_io));
   }
 
@@ -178,7 +178,7 @@
 
   int nRegisterNdn = 0, nRegisterLocalhopNfd = 0;
   this->processInterest = [&] (const Interest& interest) {
-    optional<ControlParameters> req = parseCommand(interest, "/localhost/nfd/faces/create");
+    auto req = parseCommand(interest, "/localhost/nfd/faces/create");
     if (req) {
       BOOST_REQUIRE(req->hasUri());
       BOOST_CHECK_EQUAL(req->getUri(), "udp4://188.7.60.95:6363");
@@ -236,7 +236,7 @@
 
   int nRegisterDefault = 0, nRegisterLocalhopNfd = 0;
   this->processInterest = [&] (const Interest& interest) {
-    optional<ControlParameters> req = parseCommand(interest, "/localhost/nfd/faces/create");
+    auto req = parseCommand(interest, "/localhost/nfd/faces/create");
     if (req) {
       ControlParameters resp;
       resp.setFaceId(3146)
diff --git a/tests/tools/nfdc/command-parser.t.cpp b/tests/tools/nfdc/command-parser.t.cpp
index 26c97fb..3c77c05 100644
--- a/tests/tools/nfdc/command-parser.t.cpp
+++ b/tests/tools/nfdc/command-parser.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -107,8 +107,8 @@
   std::tie(noun, verb, ca, execute) = parser.parse({"route", "add", "/n", "300"}, ParseMode::ONE_SHOT);
   BOOST_CHECK_EQUAL(noun, "route");
   BOOST_CHECK_EQUAL(verb, "add");
-  BOOST_CHECK_EQUAL(ndn::any_cast<Name>(ca.at("prefix")), "/n");
-  BOOST_CHECK_EQUAL(ndn::any_cast<uint64_t>(ca.at("nexthop")), 300);
+  BOOST_CHECK_EQUAL(std::any_cast<Name>(ca.at("prefix")), "/n");
+  BOOST_CHECK_EQUAL(std::any_cast<uint64_t>(ca.at("nexthop")), 300);
 
   std::tie(noun, verb, ca, execute) = parser.parse({"route", "add2", "/n", "300"}, ParseMode::ONE_SHOT);
   BOOST_CHECK_EQUAL(noun, "route");
@@ -117,7 +117,7 @@
   std::tie(noun, verb, ca, execute) = parser.parse({"route", "list", "400"}, ParseMode::ONE_SHOT);
   BOOST_CHECK_EQUAL(noun, "route");
   BOOST_CHECK_EQUAL(verb, "list");
-  BOOST_CHECK_EQUAL(ndn::any_cast<uint64_t>(ca.at("nexthop")), 400);
+  BOOST_CHECK_EQUAL(std::any_cast<uint64_t>(ca.at("nexthop")), 400);
 
   BOOST_CHECK_THROW(parser.parse({}, ParseMode::ONE_SHOT),
                     CommandParser::NoSuchCommandError);
diff --git a/tests/tools/nfdc/face-module.t.cpp b/tests/tools/nfdc/face-module.t.cpp
index e2c9a86..d99383e 100644
--- a/tests/tools/nfdc/face-module.t.cpp
+++ b/tests/tools/nfdc/face-module.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -379,7 +379,8 @@
 {
 protected:
   void
-  respond409(const Interest& interest, FacePersistency persistency, optional<uint64_t> mtu = {},
+  respond409(const Interest& interest, FacePersistency persistency,
+             std::optional<uint64_t> mtu = std::nullopt,
              bool enableLpReliability = false,
              bool enableCongestionMarking = false)
   {
diff --git a/tests/tools/nfdc/status-fixture.hpp b/tests/tools/nfdc/status-fixture.hpp
index 96edbba..f00b135 100644
--- a/tests/tools/nfdc/status-fixture.hpp
+++ b/tests/tools/nfdc/status-fixture.hpp
@@ -64,7 +64,7 @@
 class StatusFixture : public MockNfdMgmtFixture
 {
 protected:
-  using ValidatorUniquePtr = typename std::result_of<MakeValidator(Face&, KeyChain&)>::type;
+  using ValidatorUniquePtr = std::invoke_result_t<MakeValidator, Face&, KeyChain&>;
 
   StatusFixture()
     : validator(MakeValidator()(face, m_keyChain))
diff --git a/tools/nfdc/canonizer.cpp b/tools/nfdc/canonizer.cpp
index 3e526cd..a44a2bf 100644
--- a/tools/nfdc/canonizer.cpp
+++ b/tools/nfdc/canonizer.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -29,10 +29,10 @@
 namespace tools {
 namespace nfdc {
 
-std::pair<optional<FaceUri>, std::string>
+std::pair<std::optional<FaceUri>, std::string>
 canonize(ExecuteContext& ctx, const FaceUri& uri)
 {
-  optional<FaceUri> result;
+  std::optional<FaceUri> result;
   std::string error;
   uri.canonize(
     [&result] (const FaceUri& canonicalUri) { result = canonicalUri; },
diff --git a/tools/nfdc/canonizer.hpp b/tools/nfdc/canonizer.hpp
index b58372d..90b3afb 100644
--- a/tools/nfdc/canonizer.hpp
+++ b/tools/nfdc/canonizer.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -39,7 +39,7 @@
 /** \brief canonize FaceUri
  *  \return pair of canonical FaceUri (nullopt if failure) and error string
  */
-std::pair<optional<FaceUri>, std::string>
+std::pair<std::optional<FaceUri>, std::string>
 canonize(ExecuteContext& ctx, const FaceUri& uri);
 
 /** \brief helper to generate exit code and error message for face canonization failures
diff --git a/tools/nfdc/command-arguments.hpp b/tools/nfdc/command-arguments.hpp
index 1d0c9bd..6e096d6 100644
--- a/tools/nfdc/command-arguments.hpp
+++ b/tools/nfdc/command-arguments.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -30,8 +30,8 @@
 #include "status-report.hpp"
 
 #include <ndn-cxx/encoding/nfd-constants.hpp>
-#include <ndn-cxx/util/any.hpp>
 
+#include <any>
 #include <boost/logic/tribool.hpp>
 
 namespace nfd {
@@ -43,17 +43,17 @@
 
 /** \brief contains named command arguments
  */
-class CommandArguments : public std::map<std::string, ndn::any>
+class CommandArguments : public std::map<std::string, std::any>
 {
 public:
   /** \return the argument value, or nullopt if the argument is omitted on command line
    */
   template<typename T>
-  optional<T>
+  std::optional<T>
   getOptional(const std::string& key) const
   {
     auto i = find(key);
-    return i == end() ? nullopt : ndn::make_optional(ndn::any_cast<T>(i->second));
+    return i == end() ? std::nullopt : std::make_optional(std::any_cast<T>(i->second));
   }
 
   /** \return the argument value, or a default value if the argument is omitted on command line
diff --git a/tools/nfdc/command-definition.cpp b/tools/nfdc/command-definition.cpp
index d421d11..3c450e1 100644
--- a/tools/nfdc/command-definition.cpp
+++ b/tools/nfdc/command-definition.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -240,7 +240,7 @@
   NDN_THROW(std::invalid_argument("unrecognized FacePersistency '" + s + "'"));
 }
 
-ndn::any
+std::any
 CommandDefinition::parseValue(ArgValueType valueType, const std::string& token) const
 {
   switch (valueType) {
diff --git a/tools/nfdc/command-definition.hpp b/tools/nfdc/command-definition.hpp
index c512948..dc5afed 100644
--- a/tools/nfdc/command-definition.hpp
+++ b/tools/nfdc/command-definition.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -191,7 +191,7 @@
   parse(const std::vector<std::string>& tokens, size_t start = 0) const;
 
 private:
-  ndn::any
+  std::any
   parseValue(ArgValueType valueType, const std::string& token) const;
 
 private:
diff --git a/tools/nfdc/command-parser.cpp b/tools/nfdc/command-parser.cpp
index 9153890..0d59de2 100644
--- a/tools/nfdc/command-parser.cpp
+++ b/tools/nfdc/command-parser.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -34,9 +34,9 @@
 
 NDN_LOG_INIT(nfdc.CommandParser);
 
-static_assert(std::is_same<std::underlying_type<AvailableIn>::type,
-                           std::underlying_type<ParseMode>::type>::value,
-              "AvailableIn and ParseMode must be declared with same underlying type");
+static_assert(std::is_same_v<std::underlying_type_t<AvailableIn>,
+                             std::underlying_type_t<ParseMode>>,
+              "AvailableIn and ParseMode must be declared with the same underlying type");
 
 std::ostream&
 operator<<(std::ostream& os, AvailableIn modes)
@@ -72,7 +72,7 @@
 
 CommandParser&
 CommandParser::addCommand(const CommandDefinition& def, const ExecuteCommand& execute,
-                          std::underlying_type<AvailableIn>::type modes)
+                          std::underlying_type_t<AvailableIn> modes)
 {
   BOOST_ASSERT(modes != AVAILABLE_IN_NONE);
 
@@ -98,7 +98,7 @@
 {
   std::vector<const CommandDefinition*> results;
   for (auto i : m_commandOrder) {
-    const Command& command = *i->second;
+    const auto& command = *i->second;
     if ((command.modes & static_cast<AvailableIn>(mode)) != 0 &&
         (noun.empty() || noun == command.def.getNoun())) {
       results.push_back(&command.def);
diff --git a/tools/nfdc/command-parser.hpp b/tools/nfdc/command-parser.hpp
index a872fcd..e0e10b0 100644
--- a/tools/nfdc/command-parser.hpp
+++ b/tools/nfdc/command-parser.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -79,7 +79,7 @@
    */
   CommandParser&
   addCommand(const CommandDefinition& def, const ExecuteCommand& execute,
-             std::underlying_type<AvailableIn>::type modes = AVAILABLE_IN_ALL);
+             std::underlying_type_t<AvailableIn> modes = AVAILABLE_IN_ALL);
 
   /** \brief add an alias "noun verb2" to existing command "noun verb"
    *  \throw std::out_of_range "noun verb" does not exist
@@ -106,7 +106,7 @@
   parse(const std::vector<std::string>& tokens, ParseMode mode) const;
 
 private:
-  typedef std::pair<std::string, std::string> CommandName;
+  using CommandName = std::pair<std::string, std::string>;
 
   struct Command
   {
@@ -117,7 +117,7 @@
 
   /** \brief map from command name or alias to command definition
    */
-  typedef std::map<CommandName, shared_ptr<Command>> CommandContainer;
+  using CommandContainer = std::map<CommandName, shared_ptr<Command>>;
   CommandContainer m_commands;
 
   /** \brief commands in insertion order
diff --git a/tools/nfdc/face-module.cpp b/tools/nfdc/face-module.cpp
index 18862aa..267187e 100644
--- a/tools/nfdc/face-module.cpp
+++ b/tools/nfdc/face-module.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -164,7 +164,7 @@
   auto mtuArg = ctx.args.getOptional<std::string>("mtu");
 
   // MTU is nominally a uint64_t, but can be the string value 'auto' to unset an override MTU
-  optional<uint64_t> mtu;
+  std::optional<uint64_t> mtu;
   if (mtuArg == "auto") {
     mtu = std::numeric_limits<uint64_t>::max();
   }
@@ -180,8 +180,8 @@
     mtu = static_cast<uint64_t>(v);
   }
 
-  optional<FaceUri> canonicalRemote;
-  optional<FaceUri> canonicalLocal;
+  std::optional<FaceUri> canonicalRemote;
+  std::optional<FaceUri> canonicalLocal;
 
   auto updateFace = [&] (ControlParameters respParams, ControlParameters resp) {
     // faces/update response does not have FaceUris, copy from faces/create response
diff --git a/tools/nfdc/find-face.cpp b/tools/nfdc/find-face.cpp
index de0fd8e..05e7eec 100644
--- a/tools/nfdc/find-face.cpp
+++ b/tools/nfdc/find-face.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -57,14 +57,14 @@
 }
 
 FindFace::Code
-FindFace::execute(const ndn::any& faceIdOrUri, bool allowMulti)
+FindFace::execute(const std::any& faceIdOrUri, bool allowMulti)
 {
-  const uint64_t* faceId = ndn::any_cast<uint64_t>(&faceIdOrUri);
+  const uint64_t* faceId = std::any_cast<uint64_t>(&faceIdOrUri);
   if (faceId != nullptr) {
     return this->execute(*faceId);
   }
   else {
-    return this->execute(ndn::any_cast<FaceUri>(faceIdOrUri), allowMulti);
+    return this->execute(std::any_cast<FaceUri>(faceIdOrUri), allowMulti);
   }
 }
 
@@ -105,7 +105,7 @@
   return m_res;
 }
 
-optional<FaceUri>
+std::optional<FaceUri>
 FindFace::canonize(const std::string& fieldName, const FaceUri& uri)
 {
   // We use a wrapper because we want to accept FaceUris that cannot be canonized
@@ -114,7 +114,7 @@
     return uri;
   }
 
-  optional<FaceUri> result;
+  std::optional<FaceUri> result;
   std::string error;
   std::tie(result, error) = nfdc::canonize(m_ctx, uri);
 
@@ -125,7 +125,7 @@
   else {
     // Canonization failed
     std::tie(m_res, m_errorReason) = canonizeErrorHelper(uri, error);
-    return nullopt;
+    return std::nullopt;
   }
 }
 
diff --git a/tools/nfdc/find-face.hpp b/tools/nfdc/find-face.hpp
index 3a6bba5..ee1c521 100644
--- a/tools/nfdc/find-face.hpp
+++ b/tools/nfdc/find-face.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -71,12 +71,12 @@
   execute(uint64_t faceId);
 
   /** \brief find face by FaceId or FaceUri
-   *  \param faceIdOrUri a ndn::any that contains uint64_t or FaceUri
+   *  \param faceIdOrUri either a FaceId (uint64_t) or a FaceUri
    *  \param allowMulti effective only if \p faceIdOrUri contains a FaceUri
    *  \throw ndn::bad_any_cast faceIdOrUri is neither uint64_t nor FaceUri
    */
   Code
-  execute(const ndn::any& faceIdOrUri, bool allowMulti = false);
+  execute(const std::any& faceIdOrUri, bool allowMulti = false);
 
   /** \brief find face by FaceQueryFilter
    *  \pre execute has not been invoked
@@ -121,7 +121,7 @@
   printDisambiguation(std::ostream& os, DisambiguationStyle style) const;
 
 private:
-  optional<FaceUri>
+  std::optional<FaceUri>
   canonize(const std::string& fieldName, const FaceUri& uri);
 
   /** \brief retrieve FaceStatus from filter
diff --git a/tools/nfdc/rib-module.cpp b/tools/nfdc/rib-module.cpp
index 544da6e..df980c4 100644
--- a/tools/nfdc/rib-module.cpp
+++ b/tools/nfdc/rib-module.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -189,7 +189,7 @@
   };
 
   auto handleFaceNotFound = [&] {
-    const FaceUri* faceUri = ndn::any_cast<FaceUri>(&nexthop);
+    const FaceUri* faceUri = std::any_cast<FaceUri>(&nexthop);
     if (faceUri == nullptr) {
       ctx.err << "Face not found\n";
       return;
@@ -203,7 +203,7 @@
       return;
     }
 
-    optional<FaceUri> canonized;
+    std::optional<FaceUri> canonized;
     std::string error;
     std::tie(canonized, error) = canonize(ctx, *faceUri);
     if (!canonized) {
