diff --git a/daemon/common/config-file.cpp b/daemon/common/config-file.cpp
index 8d70349..a71bade 100644
--- a/daemon/common/config-file.cpp
+++ b/daemon/common/config-file.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,
@@ -32,8 +32,8 @@
 
 namespace nfd {
 
-ConfigFile::ConfigFile(UnknownConfigSectionHandler unknownSectionCallback)
-  : m_unknownSectionCallback(unknownSectionCallback)
+ConfigFile::ConfigFile(UnknownConfigSectionHandler callback)
+  : m_unknownSectionCallback(std::move(callback))
 {
 }
 
@@ -77,7 +77,7 @@
 ConfigFile::addSectionHandler(const std::string& sectionName,
                               ConfigSectionHandler subscriber)
 {
-  m_subscriptions[sectionName] = subscriber;
+  m_subscriptions[sectionName] = std::move(subscriber);
 }
 
 void
diff --git a/daemon/common/privilege-helper.hpp b/daemon/common/privilege-helper.hpp
index f0eb3bd..b26dce6 100644
--- a/daemon/common/privilege-helper.hpp
+++ b/daemon/common/privilege-helper.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,
@@ -71,7 +71,7 @@
   {
     raise();
     try {
-      std::forward<F>(f)();
+      std::invoke(std::forward<F>(f));
     }
     catch (...) {
       drop();
diff --git a/daemon/face/datagram-transport.hpp b/daemon/face/datagram-transport.hpp
index e0e2f58..950a49f 100644
--- a/daemon/face/datagram-transport.hpp
+++ b/daemon/face/datagram-transport.hpp
@@ -178,9 +178,7 @@
 
   NFD_LOG_FACE_TRACE("Received: " << buffer.size() << " bytes from " << m_sender);
 
-  bool isOk = false;
-  Block element;
-  std::tie(isOk, element) = Block::fromBuffer(buffer);
+  auto [isOk, element] = Block::fromBuffer(buffer);
   if (!isOk) {
     NFD_LOG_FACE_WARN("Failed to parse incoming packet from " << m_sender);
     // This packet won't extend the face lifetime
diff --git a/daemon/face/ethernet-channel.cpp b/daemon/face/ethernet-channel.cpp
index fae9af2..2509140 100644
--- a/daemon/face/ethernet-channel.cpp
+++ b/daemon/face/ethernet-channel.cpp
@@ -120,19 +120,15 @@
     return;
   }
 
-  span<const uint8_t> pkt;
-  std::string err;
-  std::tie(pkt, err) = m_pcap.readNextPacket();
-
+  auto [pkt, readErr] = m_pcap.readNextPacket();
   if (pkt.empty()) {
-    NFD_LOG_CHAN_WARN("Read error: " << err);
+    NFD_LOG_CHAN_WARN("Read error: " << readErr);
   }
   else {
-    const ether_header* eh;
-    std::tie(eh, err) = ethernet::checkFrameHeader(pkt, m_localEndpoint->getEthernetAddress(),
-                                                   m_localEndpoint->getEthernetAddress());
+    auto [eh, frameErr] = ethernet::checkFrameHeader(pkt, m_localEndpoint->getEthernetAddress(),
+                                                     m_localEndpoint->getEthernetAddress());
     if (eh == nullptr) {
-      NFD_LOG_CHAN_DEBUG(err);
+      NFD_LOG_CHAN_DEBUG(frameErr);
     }
     else {
       ethernet::Address sender(eh->ether_shost);
diff --git a/daemon/face/ethernet-factory.cpp b/daemon/face/ethernet-factory.cpp
index fec671f..4fea598 100644
--- a/daemon/face/ethernet-factory.cpp
+++ b/daemon/face/ethernet-factory.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,
@@ -240,7 +240,7 @@
 {
   BOOST_ASSERT(address.isMulticast());
 
-  auto key = std::make_pair(netif.getName(), address);
+  std::pair key(netif.getName(), address);
   auto found = m_mcastFaces.find(key);
   if (found != m_mcastFaces.end()) {
     return found->second;
@@ -339,7 +339,7 @@
     return nullptr;
   }
 
-  if (face->getId() == face::INVALID_FACEID) {
+  if (face->getId() == INVALID_FACEID) {
     // new face: register with forwarding
     this->addFace(face);
   }
diff --git a/daemon/face/ethernet-transport.cpp b/daemon/face/ethernet-transport.cpp
index 7aac95a..568064b 100644
--- a/daemon/face/ethernet-transport.cpp
+++ b/daemon/face/ethernet-transport.cpp
@@ -168,19 +168,15 @@
     return;
   }
 
-  span<const uint8_t> pkt;
-  std::string err;
-  std::tie(pkt, err) = m_pcap.readNextPacket();
-
+  auto [pkt, readErr] = m_pcap.readNextPacket();
   if (pkt.empty()) {
-    NFD_LOG_FACE_WARN("Read error: " << err);
+    NFD_LOG_FACE_WARN("Read error: " << readErr);
   }
   else {
-    const ether_header* eh;
-    std::tie(eh, err) = ethernet::checkFrameHeader(pkt, m_srcAddress,
-                                                   m_destAddress.isMulticast() ? m_destAddress : m_srcAddress);
+    auto [eh, frameErr] = ethernet::checkFrameHeader(pkt, m_srcAddress,
+                                                     m_destAddress.isMulticast() ? m_destAddress : m_srcAddress);
     if (eh == nullptr) {
-      NFD_LOG_FACE_WARN(err);
+      NFD_LOG_FACE_WARN(frameErr);
     }
     else {
       ethernet::Address sender(eh->ether_shost);
@@ -204,9 +200,7 @@
 {
   NFD_LOG_FACE_TRACE("Received: " << payload.size() << " bytes from " << sender);
 
-  bool isOk = false;
-  Block element;
-  std::tie(isOk, element) = Block::fromBuffer(payload);
+  auto [isOk, element] = Block::fromBuffer(payload);
   if (!isOk) {
     NFD_LOG_FACE_WARN("Failed to parse incoming packet from " << sender);
     // This packet won't extend the face lifetime
diff --git a/daemon/face/face-common.hpp b/daemon/face/face-common.hpp
index 0e6f0bb..039d2fe 100644
--- a/daemon/face/face-common.hpp
+++ b/daemon/face/face-common.hpp
@@ -39,26 +39,28 @@
 class Face;
 class LinkService;
 
-/** \brief Identifies a face.
+/**
+ * \brief Identifies a face.
  */
 using FaceId = uint64_t;
 
-/// indicates an invalid FaceId
-const FaceId INVALID_FACEID = ndn::nfd::INVALID_FACE_ID;
-/// identifies the InternalFace used in management
-const FaceId FACEID_INTERNAL_FACE = 1;
-/// identifies a packet comes from the ContentStore
-const FaceId FACEID_CONTENT_STORE = 254;
-/// identifies the NullFace that drops every packet
-const FaceId FACEID_NULL = 255;
-/// upper bound of reserved FaceIds
-const FaceId FACEID_RESERVED_MAX = 255;
+/// Indicates an invalid FaceId
+constexpr FaceId INVALID_FACEID = ndn::nfd::INVALID_FACE_ID;
+/// Identifies the InternalFace used in management
+constexpr FaceId FACEID_INTERNAL_FACE = 1;
+/// Identifies a packet comes from the ContentStore
+constexpr FaceId FACEID_CONTENT_STORE = 254;
+/// Identifies the NullFace that drops every packet
+constexpr FaceId FACEID_NULL = 255;
+/// Upper bound of reserved FaceIds
+constexpr FaceId FACEID_RESERVED_MAX = 255;
 
-/** \brief Minimum MTU that may be set
+/**
+ * \brief Minimum MTU that may be set.
  *
- *  This is done to ensure the NDNLPv2 fragmentation feature functions properly.
+ * This is done to ensure the NDNLPv2 fragmentation feature functions properly.
  */
-const ssize_t MIN_MTU = 64;
+constexpr ssize_t MIN_MTU = 64;
 
 /** \brief Identifies a remote endpoint on the link.
  *
diff --git a/daemon/face/face-system.cpp b/daemon/face/face-system.cpp
index 79cb436..f86ea25 100644
--- a/daemon/face/face-system.cpp
+++ b/daemon/face/face-system.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,
@@ -120,22 +120,19 @@
   }
 
   // process in protocol factories
-  for (const auto& pair : m_factories) {
-    const std::string& sectionName = pair.first;
-    ProtocolFactory* factory = pair.second.get();
-
+  for (const auto& [sectionName, factory] : m_factories) {
     std::set<std::string> oldProvidedSchemes = factory->getProvidedSchemes();
     factory->processConfig(configSection.get_child_optional(sectionName), context);
 
     if (!isDryRun) {
-      for (const std::string& scheme : factory->getProvidedSchemes()) {
-        m_factoryByScheme[scheme] = factory;
+      for (const auto& scheme : factory->getProvidedSchemes()) {
+        m_factoryByScheme[scheme] = factory.get();
         if (oldProvidedSchemes.erase(scheme) == 0) {
           NFD_LOG_TRACE("factory " << sectionName <<
                         " provides " << scheme << " FaceUri scheme");
         }
       }
-      for (const std::string& scheme : oldProvidedSchemes) {
+      for (const auto& scheme : oldProvidedSchemes) {
         m_factoryByScheme.erase(scheme);
         NFD_LOG_TRACE("factory " << sectionName <<
                       " no longer provides " << scheme << " FaceUri scheme");
diff --git a/daemon/face/face.cpp b/daemon/face/face.cpp
index 6422a39..cc606d0 100644
--- a/daemon/face/face.cpp
+++ b/daemon/face/face.cpp
@@ -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,
@@ -34,7 +34,6 @@
   , afterReceiveNack(service->afterReceiveNack)
   , onDroppedInterest(service->onDroppedInterest)
   , afterStateChange(transport->afterStateChange)
-  , m_id(INVALID_FACEID)
   , m_service(std::move(service))
   , m_transport(std::move(transport))
   , m_counters(m_service->getCounters(), m_transport->getCounters())
diff --git a/daemon/face/face.hpp b/daemon/face/face.hpp
index e9731ee..976a959 100644
--- a/daemon/face/face.hpp
+++ b/daemon/face/face.hpp
@@ -202,7 +202,7 @@
   }
 
 private:
-  FaceId m_id;
+  FaceId m_id = INVALID_FACEID;
   unique_ptr<LinkService> m_service;
   unique_ptr<Transport> m_transport;
   FaceCounters m_counters;
diff --git a/daemon/face/generic-link-service.cpp b/daemon/face/generic-link-service.cpp
index 5ed4ac2..a21aec2 100644
--- a/daemon/face/generic-link-service.cpp
+++ b/daemon/face/generic-link-service.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,
@@ -312,10 +312,7 @@
       return;
     }
 
-    bool isReassembled = false;
-    Block netPkt;
-    lp::Packet firstPkt;
-    std::tie(isReassembled, netPkt, firstPkt) = m_reassembler.receiveFragment(endpoint, pkt);
+    auto [isReassembled, netPkt, firstPkt] = m_reassembler.receiveFragment(endpoint, pkt);
     if (isReassembled) {
       this->decodeNetPacket(netPkt, firstPkt, endpoint);
     }
diff --git a/daemon/face/generic-link-service.hpp b/daemon/face/generic-link-service.hpp
index 7a86b09..0f589a3 100644
--- a/daemon/face/generic-link-service.hpp
+++ b/daemon/face/generic-link-service.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,
@@ -310,7 +310,7 @@
   /// number of marked packets in the current incident of congestion
   size_t m_nMarkedSinceInMarkingState;
 
-  friend class LpReliability;
+  friend LpReliability;
 };
 
 inline const GenericLinkService::Options&
diff --git a/daemon/face/internal-face.cpp b/daemon/face/internal-face.cpp
index 764dfd7..a7aa7fb 100644
--- a/daemon/face/internal-face.cpp
+++ b/daemon/face/internal-face.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,
@@ -46,7 +46,7 @@
 
   auto clientFace = make_shared<ndn::Face>(clientTransport, getGlobalIoService(), clientKeyChain);
 
-  return std::make_tuple(face, clientFace);
+  return {face, clientFace};
 }
 
 } // namespace face
diff --git a/daemon/face/lp-fragmenter.cpp b/daemon/face/lp-fragmenter.cpp
index 7494ca7..6b1755a 100644
--- a/daemon/face/lp-fragmenter.cpp
+++ b/daemon/face/lp-fragmenter.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,
@@ -39,18 +39,18 @@
 static_assert(lp::tlv::FragCount < 253, "FragCount TLV-TYPE must fit in 1 octet");
 static_assert(lp::tlv::Fragment < 253, "Fragment TLV-TYPE must fit in 1 octet");
 
-/** \brief maximum overhead on a single fragment,
- *         not counting other NDNLPv2 headers
+/**
+ * \brief Maximum overhead on a single fragment, not counting other NDNLPv2 headers.
  */
-static const size_t MAX_SINGLE_FRAG_OVERHEAD =
+const size_t MAX_SINGLE_FRAG_OVERHEAD =
   1 + 9 + // LpPacket TLV-TYPE and TLV-LENGTH
   1 + 1 + 8 + // Sequence TLV
   1 + 9; // Fragment TLV-TYPE and TLV-LENGTH
 
-/** \brief maximum overhead of adding fragmentation to payload,
- *         not counting other NDNLPv2 headers
+/**
+ * \brief Maximum overhead of adding fragmentation to payload, not counting other NDNLPv2 headers.
  */
-static const size_t MAX_FRAG_OVERHEAD =
+const size_t MAX_FRAG_OVERHEAD =
   1 + 9 + // LpPacket TLV-TYPE and TLV-LENGTH
   1 + 1 + 8 + // Sequence TLV
   1 + 1 + 8 + // FragIndex TLV
@@ -86,18 +86,17 @@
     // fast path: fragmentation not needed
     // To qualify for fast path, the packet must have space for adding a sequence number,
     // because another NDNLPv2 feature may require the sequence number.
-    return std::make_tuple(true, std::vector<lp::Packet>{packet});
+    return {true, {packet}};
   }
 
-  ndn::Buffer::const_iterator netPktBegin, netPktEnd;
-  std::tie(netPktBegin, netPktEnd) = packet.get<lp::FragmentField>();
+  auto [netPktBegin, netPktEnd] = packet.get<lp::FragmentField>();
   size_t netPktSize = std::distance(netPktBegin, netPktEnd);
 
   // compute size of other NDNLPv2 headers to be placed on the first fragment
   size_t firstHeaderSize = 0;
-  const Block& packetWire = packet.wireEncode();
+  const auto& packetWire = packet.wireEncode();
   if (packetWire.type() == lp::tlv::LpPacket) {
-    for (const Block& element : packetWire.elements()) {
+    for (const auto& element : packetWire.elements()) {
       if (element.type() != lp::tlv::Fragment) {
         firstHeaderSize += element.size();
       }
@@ -107,7 +106,7 @@
   // compute payload size
   if (MAX_FRAG_OVERHEAD + firstHeaderSize + 1 > mtu) { // 1-octet fragment
     NFD_LOG_FACE_WARN("fragmentation error, MTU too small for first fragment: DROP");
-    return std::make_tuple(false, std::vector<lp::Packet>{});
+    return {false, {}};
   }
   size_t firstPayloadSize = std::min(netPktSize, mtu - firstHeaderSize - MAX_FRAG_OVERHEAD);
   size_t payloadSize = mtu - MAX_FRAG_OVERHEAD;
@@ -117,7 +116,7 @@
   // compute FragCount
   if (fragCount > m_options.nMaxFragments) {
     NFD_LOG_FACE_WARN("fragmentation error, FragCount over limit: DROP");
-    return std::make_tuple(false, std::vector<lp::Packet>{});
+    return {false, {}};
   }
 
   // populate fragments
@@ -139,7 +138,7 @@
   }
   BOOST_ASSERT(fragIndex == fragCount);
 
-  return std::make_tuple(true, frags);
+  return {true, frags};
 }
 
 std::ostream&
diff --git a/daemon/face/lp-reassembler.cpp b/daemon/face/lp-reassembler.cpp
index 77a7120..a4b255b 100644
--- a/daemon/face/lp-reassembler.cpp
+++ b/daemon/face/lp-reassembler.cpp
@@ -45,8 +45,6 @@
 {
   BOOST_ASSERT(packet.has<lp::FragmentField>());
 
-  static auto FALSE_RETURN = std::make_tuple(false, Block(), lp::Packet());
-
   // read and check FragIndex and FragCount
   uint64_t fragIndex = 0;
   uint64_t fragCount = 1;
@@ -59,12 +57,12 @@
 
   if (fragIndex >= fragCount) {
     NFD_LOG_FACE_WARN("reassembly error, FragIndex>=FragCount: DROP");
-    return FALSE_RETURN;
+    return {false, {}, {}};
   }
 
   if (fragCount > m_options.nMaxFragments) {
     NFD_LOG_FACE_WARN("reassembly error, FragCount over limit: DROP");
-    return FALSE_RETURN;
+    return {false, {}, {}};
   }
 
   // check for fast path
@@ -77,10 +75,11 @@
   // check Sequence and compute message identifier
   if (!packet.has<lp::SequenceField>()) {
     NFD_LOG_FACE_WARN("reassembly error, Sequence missing: DROP");
-    return FALSE_RETURN;
+    return {false, {}, {}};
   }
+
   lp::Sequence messageIdentifier = packet.get<lp::SequenceField>() - fragIndex;
-  Key key = std::make_tuple(remoteEndpoint, messageIdentifier);
+  Key key(remoteEndpoint, messageIdentifier);
 
   // add to PartialPacket
   PartialPacket& pp = m_partialPackets[key];
@@ -92,13 +91,13 @@
   else {
     if (fragCount != pp.fragCount) {
       NFD_LOG_FACE_WARN("reassembly error, FragCount changed: DROP");
-      return FALSE_RETURN;
+      return {false, {}, {}};
     }
   }
 
   if (pp.fragments[fragIndex].has<lp::SequenceField>()) {
     NFD_LOG_FACE_TRACE("fragment already received: DROP");
-    return FALSE_RETURN;
+    return {false, {}, {}};
   }
 
   pp.fragments[fragIndex] = packet;
@@ -109,13 +108,13 @@
     Block reassembled = doReassembly(key);
     lp::Packet firstFrag(std::move(pp.fragments[0]));
     m_partialPackets.erase(key);
-    return std::make_tuple(true, reassembled, firstFrag);
+    return {true, reassembled, firstFrag};
   }
 
   // set drop timer
   pp.dropTimer = getScheduler().schedule(m_options.reassemblyTimeout, [=] { timeoutPartialPacket(key); });
 
-  return FALSE_RETURN;
+  return {false, {}, {}};
 }
 
 Block
@@ -125,20 +124,16 @@
 
   size_t payloadSize = std::accumulate(pp.fragments.begin(), pp.fragments.end(), 0U,
     [&] (size_t sum, const lp::Packet& pkt) -> size_t {
-      ndn::Buffer::const_iterator fragBegin, fragEnd;
-      std::tie(fragBegin, fragEnd) = pkt.get<lp::FragmentField>();
+      auto [fragBegin, fragEnd] = pkt.get<lp::FragmentField>();
       return sum + std::distance(fragBegin, fragEnd);
     });
 
   ndn::Buffer fragBuffer(payloadSize);
   auto it = fragBuffer.begin();
-
   for (const lp::Packet& frag : pp.fragments) {
-    ndn::Buffer::const_iterator fragBegin, fragEnd;
-    std::tie(fragBegin, fragEnd) = frag.get<lp::FragmentField>();
+    auto [fragBegin, fragEnd] = frag.get<lp::FragmentField>();
     it = std::copy(fragBegin, fragEnd, it);
   }
-
   return Block(fragBuffer);
 }
 
diff --git a/daemon/face/lp-reassembler.hpp b/daemon/face/lp-reassembler.hpp
index 95c66ff..59db89b 100644
--- a/daemon/face/lp-reassembler.hpp
+++ b/daemon/face/lp-reassembler.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,
@@ -33,8 +33,9 @@
 namespace nfd {
 namespace face {
 
-/** \brief reassembles fragmented network-layer packets
- *  \sa https://redmine.named-data.net/projects/nfd/wiki/NDNLPv2
+/**
+ * \brief Reassembles fragmented network-layer packets
+ * \sa https://redmine.named-data.net/projects/nfd/wiki/NDNLPv2
  */
 class LpReassembler : noncopyable
 {
@@ -96,7 +97,8 @@
   signal::Signal<LpReassembler, EndpointId, size_t> beforeTimeout;
 
 private:
-  /** \brief holds all fragments of packet until reassembled
+  /**
+   * \brief Holds all fragments of packet until reassembled
    */
   struct PartialPacket
   {
@@ -106,12 +108,13 @@
     scheduler::ScopedEventId dropTimer;
   };
 
-  /** \brief index key for PartialPackets
+  /**
+   * \brief Index key for PartialPackets
    */
-  typedef std::tuple<
+  using Key = std::tuple<
     EndpointId, // remoteEndpoint
     lp::Sequence // message identifier (sequence of the first fragment)
-  > Key;
+  >;
 
   Block
   doReassembly(const Key& key);
diff --git a/daemon/face/lp-reliability.cpp b/daemon/face/lp-reliability.cpp
index 95849b1..b287bc3 100644
--- a/daemon/face/lp-reliability.cpp
+++ b/daemon/face/lp-reliability.cpp
@@ -80,10 +80,7 @@
     lp::Sequence txSeq = assignTxSequence(frag);
 
     // Store LpPacket for future retransmissions
-    unackedFragsIt = m_unackedFrags.emplace_hint(unackedFragsIt,
-                                                 std::piecewise_construct,
-                                                 std::forward_as_tuple(txSeq),
-                                                 std::forward_as_tuple(frag));
+    unackedFragsIt = m_unackedFrags.try_emplace(unackedFragsIt, txSeq, frag);
     unackedFragsIt->second.sendTime = sendTime;
     auto rto = m_rttEst.getEstimatedRto();
     lp::Sequence seq = frag.get<lp::SequenceField>();
@@ -179,7 +176,7 @@
         m_recentRecvSeqs.erase(m_recentRecvSeqsQueue.front());
         m_recentRecvSeqsQueue.pop();
       }
-      m_recentRecvSeqs.emplace(pktSequence, now);
+      m_recentRecvSeqs.try_emplace(pktSequence, now);
       m_recentRecvSeqsQueue.push(pktSequence);
     }
 
@@ -324,13 +321,10 @@
     netPkt->didRetx = true;
 
     // Move fragment to new TxSequence mapping
-    auto newTxFragIt = m_unackedFrags.emplace_hint(
-      m_firstUnackedFrag != m_unackedFrags.end() && m_firstUnackedFrag->first > newTxSeq
-        ? m_firstUnackedFrag
-        : m_unackedFrags.end(),
-      std::piecewise_construct,
-      std::forward_as_tuple(newTxSeq),
-      std::forward_as_tuple(txFrag.pkt));
+    auto hint = m_firstUnackedFrag != m_unackedFrags.end() && m_firstUnackedFrag->first > newTxSeq
+                ? m_firstUnackedFrag
+                : m_unackedFrags.end();
+    auto newTxFragIt = m_unackedFrags.try_emplace(hint, newTxSeq, txFrag.pkt);
     auto& newTxFrag = newTxFragIt->second;
     newTxFrag.retxCount = txFrag.retxCount + 1;
     newTxFrag.netPkt = netPkt;
diff --git a/daemon/face/lp-reliability.hpp b/daemon/face/lp-reliability.hpp
index 4349fca..c83b0bc 100644
--- a/daemon/face/lp-reliability.hpp
+++ b/daemon/face/lp-reliability.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,18 @@
 
 class GenericLinkService;
 
-/** \brief provides for reliable sending and receiving of link-layer packets
- *  \sa https://redmine.named-data.net/projects/nfd/wiki/NDNLPv2
+/**
+ * \brief Provides for reliable sending and receiving of link-layer packets
+ * \sa https://redmine.named-data.net/projects/nfd/wiki/NDNLPv2
  */
 class LpReliability : noncopyable
 {
 public:
+  /// TxSequence TLV-TYPE (3 octets) + TLV-LENGTH (1 octet) + lp::Sequence (8 octets)
+  static constexpr size_t RESERVED_HEADER_SPACE = tlv::sizeOfVarNumber(lp::tlv::TxSequence) +
+                                                  tlv::sizeOfVarNumber(sizeof(lp::Sequence)) +
+                                                  sizeof(lp::Sequence);
+
   struct Options
   {
     /** \brief enables link-layer reliability
@@ -110,7 +116,6 @@
   class NetPkt;
   using UnackedFrags = std::map<lp::Sequence, UnackedFrag>;
 
-NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   /** \brief assign TxSequence number to a fragment
    *  \param frag fragment to assign TxSequence to
    *  \return assigned TxSequence number
@@ -163,7 +168,8 @@
   deleteUnackedFrag(UnackedFrags::iterator fragIt);
 
 NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
-  /** \brief contains a sent fragment that has not been acknowledged and associated data
+  /**
+   * \brief Contains a sent fragment that has not been acknowledged and associated data
    */
   class UnackedFrag
   {
@@ -180,7 +186,8 @@
     shared_ptr<NetPkt> netPkt;
   };
 
-  /** \brief contains a network-layer packet with unacknowledged fragments
+  /**
+   * \brief Contains a network-layer packet with unacknowledged fragments
    */
   class NetPkt
   {
@@ -194,13 +201,6 @@
     bool didRetx;
   };
 
-public:
-  /// TxSequence TLV-TYPE (3 octets) + TLV-LENGTH (1 octet) + lp::Sequence (8 octets)
-  static constexpr size_t RESERVED_HEADER_SPACE = tlv::sizeOfVarNumber(lp::tlv::TxSequence) +
-                                                  tlv::sizeOfVarNumber(sizeof(lp::Sequence)) +
-                                                  sizeof(lp::Sequence);
-
-NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   Options m_options;
   GenericLinkService* m_linkService;
   UnackedFrags m_unackedFrags;
diff --git a/daemon/face/netdev-bound.cpp b/daemon/face/netdev-bound.cpp
index 124ea3a..b22bf62 100644
--- a/daemon/face/netdev-bound.cpp
+++ b/daemon/face/netdev-bound.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,
@@ -46,9 +46,7 @@
   std::vector<Rule> rules;
   if (configSection) {
     int ruleIndex = 0;
-    for (const auto& pair : *configSection) {
-      const std::string& key = pair.first;
-      const ConfigSection& value = pair.second;
+    for (const auto& [key, value] : *configSection) {
       if (key == "rule") {
         rules.push_back(parseRule(ruleIndex++, value));
       }
@@ -94,9 +92,7 @@
 
   bool hasWhitelist = false;
   bool hasBlacklist = false;
-  for (const auto& pair : confRule) {
-    const std::string& key = pair.first;
-    const ConfigSection& value = pair.second;
+  for (const auto& [key, value] : confRule) {
     if (key == "remote") {
       try {
         rule.remotes.emplace_back(value.get_value<std::string>());
diff --git a/daemon/face/protocol-factory.hpp b/daemon/face/protocol-factory.hpp
index 50023cc..fcc0418 100644
--- a/daemon/face/protocol-factory.hpp
+++ b/daemon/face/protocol-factory.hpp
@@ -69,9 +69,11 @@
   static void
   registerType(const std::string& id = PF::getId())
   {
-    Registry& registry = getRegistry();
-    BOOST_ASSERT(registry.count(id) == 0);
-    registry[id] = [] (const CtorParams& p) { return make_unique<PF>(p); };
+    BOOST_ASSERT(!id.empty());
+    auto r = getRegistry().insert_or_assign(id, [] (auto&&... p) {
+      return make_unique<PF>(std::forward<decltype(p)>(p)...);
+    });
+    BOOST_VERIFY(r.second);
   }
 
   /** \brief Create a protocol factory instance
diff --git a/daemon/face/tcp-transport.cpp b/daemon/face/tcp-transport.cpp
index 0da07af..466e2c6 100644
--- a/daemon/face/tcp-transport.cpp
+++ b/daemon/face/tcp-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,
@@ -36,16 +36,12 @@
 
 NFD_LOG_MEMBER_INIT_SPECIALIZED(StreamTransport<boost::asio::ip::tcp>, TcpTransport);
 
-time::milliseconds TcpTransport::s_initialReconnectWait = 1_s;
-time::milliseconds TcpTransport::s_maxReconnectWait = 5_min;
-float TcpTransport::s_reconnectWaitMultiplier = 2.0f;
-
 TcpTransport::TcpTransport(protocol::socket&& socket,
                            ndn::nfd::FacePersistency persistency,
                            ndn::nfd::FaceScope faceScope)
   : StreamTransport(std::move(socket))
   , m_remoteEndpoint(m_socket.remote_endpoint())
-  , m_nextReconnectWait(s_initialReconnectWait)
+  , m_nextReconnectWait(INITIAL_RECONNECT_DELAY)
 {
   this->setLocalUri(FaceUri(m_socket.local_endpoint()));
   this->setRemoteUri(FaceUri(m_socket.remote_endpoint()));
@@ -165,7 +161,7 @@
   }
 
   m_reconnectEvent.cancel();
-  m_nextReconnectWait = s_initialReconnectWait;
+  m_nextReconnectWait = INITIAL_RECONNECT_DELAY;
 
   this->setLocalUri(FaceUri(m_socket.local_endpoint()));
   NFD_LOG_FACE_TRACE("TCP connection reestablished");
@@ -182,8 +178,8 @@
 
   // exponentially back off the reconnection timer
   m_nextReconnectWait =
-      std::min(time::duration_cast<time::milliseconds>(m_nextReconnectWait * s_reconnectWaitMultiplier),
-               s_maxReconnectWait);
+      std::min(time::duration_cast<time::milliseconds>(m_nextReconnectWait * RECONNECT_DELAY_MULTIPLIER),
+               MAX_RECONNECT_DELAY);
 
   // do this asynchronously because there could be some callbacks still pending
   getGlobalIoService().post([this] { reconnect(); });
diff --git a/daemon/face/tcp-transport.hpp b/daemon/face/tcp-transport.hpp
index c300eed..950d850 100644
--- a/daemon/face/tcp-transport.hpp
+++ b/daemon/face/tcp-transport.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,
@@ -72,17 +72,20 @@
   handleReconnectTimeout();
 
 NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
-  /** \brief how long to wait before the first reconnection attempt after the TCP connection has been severed
+  /**
+   * \brief Delay before the first reconnection attempt after the TCP connection has been severed
    */
-  static time::milliseconds s_initialReconnectWait;
+  static constexpr time::milliseconds INITIAL_RECONNECT_DELAY = 1_s;
 
-  /** \brief maximum amount of time to wait before a reconnection attempt
+  /**
+   * \brief Maximum amount of time to wait before a reconnection attempt
    */
-  static time::milliseconds s_maxReconnectWait;
+  static constexpr time::milliseconds MAX_RECONNECT_DELAY = 5_min;
 
-  /** \brief multiplier for the exponential backoff of the reconnection timer
+  /**
+   * \brief Multiplier for the exponential backoff of the reconnection timer
    */
-  static float s_reconnectWaitMultiplier;
+  static constexpr float RECONNECT_DELAY_MULTIPLIER = 2.0f;
 
 private:
   typename protocol::endpoint m_remoteEndpoint;
diff --git a/daemon/face/transport.hpp b/daemon/face/transport.hpp
index 9b84c99..2725596 100644
--- a/daemon/face/transport.hpp
+++ b/daemon/face/transport.hpp
@@ -86,24 +86,29 @@
   ByteCounter nOutBytes;
 };
 
-/** \brief indicates the transport has no limit on payload size
+/**
+ * \brief Indicates that the transport has no limit on payload size
  */
-const ssize_t MTU_UNLIMITED = -1;
+constexpr ssize_t MTU_UNLIMITED = -1;
 
-/** \brief (for internal use) indicates MTU field is unset
+/**
+ * \brief (for internal use) Indicates that the MTU field is unset
  */
-const ssize_t MTU_INVALID = -2;
+constexpr ssize_t MTU_INVALID = -2;
 
-/** \brief indicates that the transport does not support reading the queue capacity/length
+/**
+ * \brief Indicates that the transport does not support reading the queue capacity/length
  */
-const ssize_t QUEUE_UNSUPPORTED = -1;
+constexpr ssize_t QUEUE_UNSUPPORTED = -1;
 
-/** \brief indicates that the transport was unable to retrieve the queue capacity/length
+/**
+ * \brief Indicates that the transport was unable to retrieve the queue capacity/length
  */
-const ssize_t QUEUE_ERROR = -2;
+constexpr ssize_t QUEUE_ERROR = -2;
 
-/** \brief The lower half of a Face.
- *  \sa Face
+/**
+ * \brief The lower half of a Face.
+ * \sa Face
  */
 class Transport : protected virtual TransportCounters, noncopyable
 {
diff --git a/daemon/fw/access-strategy.cpp b/daemon/fw/access-strategy.cpp
index e1443df..e80c581 100644
--- a/daemon/fw/access-strategy.cpp
+++ b/daemon/fw/access-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,
@@ -60,8 +60,7 @@
 AccessStrategy::afterReceiveInterest(const Interest& interest, const FaceEndpoint& ingress,
                                      const shared_ptr<pit::Entry>& pitEntry)
 {
-  auto suppressResult = m_retxSuppression.decidePerPitEntry(*pitEntry);
-  switch (suppressResult) {
+  switch (auto res = m_retxSuppression.decidePerPitEntry(*pitEntry); res) {
   case RetxSuppressionResult::NEW:
     return afterReceiveNewInterest(interest, ingress, pitEntry);
   case RetxSuppressionResult::FORWARD:
@@ -77,9 +76,7 @@
                                         const shared_ptr<pit::Entry>& pitEntry)
 {
   const auto& fibEntry = this->lookupFib(*pitEntry);
-  Name miName;
-  MtInfo* mi = nullptr;
-  std::tie(miName, mi) = this->findPrefixMeasurements(*pitEntry);
+  auto [miName, mi] = this->findPrefixMeasurements(*pitEntry);
 
   // has measurements for Interest Name?
   if (mi != nullptr) {
@@ -236,10 +233,7 @@
 void
 AccessStrategy::updateMeasurements(const Face& inFace, const Data& data, time::nanoseconds rtt)
 {
-  auto ret = m_fit.emplace(std::piecewise_construct,
-                           std::forward_as_tuple(inFace.getId()),
-                           std::forward_as_tuple(m_rttEstimatorOpts));
-  FaceInfo& fi = ret.first->second;
+  FaceInfo& fi = m_fit.try_emplace(inFace.getId(), m_rttEstimatorOpts).first->second;
   fi.rtt.addMeasurement(rtt);
 
   MtInfo* mi = this->addPrefixMeasurements(data);
@@ -257,14 +251,14 @@
 {
   auto me = this->getMeasurements().findLongestPrefixMatch(pitEntry);
   if (me == nullptr) {
-    return std::make_tuple(Name(), nullptr);
+    return {Name{}, nullptr};
   }
 
   auto mi = me->getStrategyInfo<MtInfo>();
   // TODO: after a runtime strategy change, it's possible that a measurements::Entry exists but
   //       the corresponding MtInfo doesn't exist (mi == nullptr); this case needs another longest
   //       prefix match until an MtInfo is found.
-  return std::make_tuple(me->getName(), mi);
+  return {me->getName(), mi};
 }
 
 AccessStrategy::MtInfo*
diff --git a/daemon/fw/asf-measurements.cpp b/daemon/fw/asf-measurements.cpp
index 2eb81dd..c49f5d5 100644
--- a/daemon/fw/asf-measurements.cpp
+++ b/daemon/fw/asf-measurements.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,
@@ -30,9 +30,6 @@
 namespace fw {
 namespace asf {
 
-const time::nanoseconds FaceInfo::RTT_NO_MEASUREMENT{-1};
-const time::nanoseconds FaceInfo::RTT_TIMEOUT{-2};
-
 time::nanoseconds
 FaceInfo::scheduleTimeout(const Name& interestName, scheduler::EventCallback cb)
 {
@@ -63,11 +60,9 @@
 FaceInfo&
 NamespaceInfo::getOrCreateFaceInfo(FaceId faceId)
 {
-  auto ret = m_fiMap.emplace(std::piecewise_construct,
-                             std::forward_as_tuple(faceId),
-                             std::forward_as_tuple(m_rttEstimatorOpts));
-  auto& faceInfo = ret.first->second;
-  if (ret.second) {
+  auto [it, isNew] = m_fiMap.try_emplace(faceId, m_rttEstimatorOpts);
+  auto& faceInfo = it->second;
+  if (isNew) {
     extendFaceInfoLifetime(faceInfo, faceId);
   }
   return faceInfo;
@@ -83,8 +78,6 @@
 ////////////////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////////////////
 
-constexpr time::microseconds AsfMeasurements::MEASUREMENTS_LIFETIME;
-
 AsfMeasurements::AsfMeasurements(MeasurementsAccessor& measurements)
   : m_measurements(measurements)
   , m_rttEstimatorOpts(make_shared<ndn::util::RttEstimator::Options>())
diff --git a/daemon/fw/asf-measurements.hpp b/daemon/fw/asf-measurements.hpp
index a3eafc9..1d2b90f 100644
--- a/daemon/fw/asf-measurements.hpp
+++ b/daemon/fw/asf-measurements.hpp
@@ -105,8 +105,8 @@
   }
 
 public:
-  static const time::nanoseconds RTT_NO_MEASUREMENT;
-  static const time::nanoseconds RTT_TIMEOUT;
+  static constexpr time::nanoseconds RTT_NO_MEASUREMENT = -1_ns;
+  static constexpr time::nanoseconds RTT_TIMEOUT = -2_ns;
 
 private:
   ndn::util::RttEstimator m_rttEstimator;
diff --git a/daemon/fw/asf-probing-module.cpp b/daemon/fw/asf-probing-module.cpp
index 425b39c..0df1712 100644
--- a/daemon/fw/asf-probing-module.cpp
+++ b/daemon/fw/asf-probing-module.cpp
@@ -33,11 +33,7 @@
 namespace fw {
 namespace asf {
 
-constexpr time::milliseconds ProbingModule::DEFAULT_PROBING_INTERVAL;
-constexpr time::milliseconds ProbingModule::MIN_PROBING_INTERVAL;
-
-static_assert(ProbingModule::DEFAULT_PROBING_INTERVAL < AsfMeasurements::MEASUREMENTS_LIFETIME,
-              "ProbingModule::DEFAULT_PROBING_INTERVAL must be less than AsfMeasurements::MEASUREMENTS_LIFETIME");
+static_assert(ProbingModule::DEFAULT_PROBING_INTERVAL < AsfMeasurements::MEASUREMENTS_LIFETIME);
 
 ProbingModule::ProbingModule(AsfMeasurements& measurements)
   : m_probingInterval(DEFAULT_PROBING_INTERVAL)
diff --git a/daemon/fw/face-table.cpp b/daemon/fw/face-table.cpp
index 49d33b6..93567bf 100644
--- a/daemon/fw/face-table.cpp
+++ b/daemon/fw/face-table.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,
@@ -76,19 +76,20 @@
 }
 
 void
-FaceTable::addImpl(shared_ptr<Face> face, FaceId faceId)
+FaceTable::addImpl(shared_ptr<Face> facePtr, FaceId faceId)
 {
-  face->setId(faceId);
-  auto ret = m_faces.emplace(faceId, face);
-  BOOST_VERIFY(ret.second);
+  facePtr->setId(faceId);
+  auto [it, isNew] = m_faces.try_emplace(faceId, std::move(facePtr));
+  BOOST_VERIFY(isNew);
+  auto& face = *it->second;
 
   NFD_LOG_INFO("Added face id=" << faceId <<
-               " remote=" << face->getRemoteUri() <<
-               " local=" << face->getLocalUri());
+               " remote=" << face.getRemoteUri() <<
+               " local=" << face.getLocalUri());
 
-  connectFaceClosedSignal(*face, [=] { remove(faceId); });
+  connectFaceClosedSignal(face, [this, faceId] { remove(faceId); });
 
-  this->afterAdd(*face);
+  this->afterAdd(face);
 }
 
 void
diff --git a/daemon/fw/forwarder.hpp b/daemon/fw/forwarder.hpp
index 47c6e03..cad9396 100644
--- a/daemon/fw/forwarder.hpp
+++ b/daemon/fw/forwarder.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,
@@ -251,7 +251,7 @@
   NetworkRegionTable m_networkRegionTable;
 
   // allow Strategy (base class) to enter pipelines
-  friend class fw::Strategy;
+  friend fw::Strategy;
 };
 
 } // namespace nfd
diff --git a/daemon/fw/retx-suppression-exponential.cpp b/daemon/fw/retx-suppression-exponential.cpp
index 114b491..6158120 100644
--- a/daemon/fw/retx-suppression-exponential.cpp
+++ b/daemon/fw/retx-suppression-exponential.cpp
@@ -24,14 +24,11 @@
  */
 
 #include "retx-suppression-exponential.hpp"
+#include "algorithm.hpp"
 
 namespace nfd {
 namespace fw {
 
-const RetxSuppressionExponential::Duration RetxSuppressionExponential::DEFAULT_INITIAL_INTERVAL = 10_ms;
-const RetxSuppressionExponential::Duration RetxSuppressionExponential::DEFAULT_MAX_INTERVAL = 250_ms;
-const float RetxSuppressionExponential::DEFAULT_MULTIPLIER = 2.0f;
-
 namespace {
 
 class PitInfo final : public StrategyInfo
diff --git a/daemon/fw/retx-suppression-exponential.hpp b/daemon/fw/retx-suppression-exponential.hpp
index 3c3be60..41d5bdb 100644
--- a/daemon/fw/retx-suppression-exponential.hpp
+++ b/daemon/fw/retx-suppression-exponential.hpp
@@ -26,7 +26,6 @@
 #ifndef NFD_DAEMON_FW_RETX_SUPPRESSION_EXPONENTIAL_HPP
 #define NFD_DAEMON_FW_RETX_SUPPRESSION_EXPONENTIAL_HPP
 
-#include "algorithm.hpp"
 #include "retx-suppression.hpp"
 #include "strategy.hpp"
 
@@ -83,9 +82,9 @@
   }
 
 public:
-  static const Duration DEFAULT_INITIAL_INTERVAL;
-  static const Duration DEFAULT_MAX_INTERVAL;
-  static const float DEFAULT_MULTIPLIER;
+  static constexpr Duration DEFAULT_INITIAL_INTERVAL = 10_ms;
+  static constexpr Duration DEFAULT_MAX_INTERVAL = 250_ms;
+  static constexpr float DEFAULT_MULTIPLIER = 2.0f;
 
 NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   const Duration m_initialInterval;
diff --git a/daemon/fw/retx-suppression-fixed.cpp b/daemon/fw/retx-suppression-fixed.cpp
index 50ade91..790ce45 100644
--- a/daemon/fw/retx-suppression-fixed.cpp
+++ b/daemon/fw/retx-suppression-fixed.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,
@@ -24,12 +24,11 @@
  */
 
 #include "retx-suppression-fixed.hpp"
+#include "algorithm.hpp"
 
 namespace nfd {
 namespace fw {
 
-const time::milliseconds RetxSuppressionFixed::DEFAULT_MIN_RETX_INTERVAL = 100_ms;
-
 RetxSuppressionFixed::RetxSuppressionFixed(const time::milliseconds& minRetxInterval)
   : m_minRetxInterval(minRetxInterval)
 {
diff --git a/daemon/fw/retx-suppression-fixed.hpp b/daemon/fw/retx-suppression-fixed.hpp
index 33ee765..e8af73b 100644
--- a/daemon/fw/retx-suppression-fixed.hpp
+++ b/daemon/fw/retx-suppression-fixed.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,
@@ -26,8 +26,8 @@
 #ifndef NFD_DAEMON_FW_RETX_SUPPRESSION_FIXED_HPP
 #define NFD_DAEMON_FW_RETX_SUPPRESSION_FIXED_HPP
 
-#include "algorithm.hpp"
 #include "retx-suppression.hpp"
+#include "table/pit-entry.hpp"
 
 namespace nfd {
 namespace fw {
@@ -48,7 +48,7 @@
   decidePerPitEntry(pit::Entry& pitEntry) const;
 
 public:
-  static const time::milliseconds DEFAULT_MIN_RETX_INTERVAL;
+  static constexpr time::milliseconds DEFAULT_MIN_RETX_INTERVAL = 100_ms;
 
 private:
   const time::milliseconds m_minRetxInterval;
diff --git a/daemon/fw/self-learning-strategy.cpp b/daemon/fw/self-learning-strategy.cpp
index 89ca397..db58050 100644
--- a/daemon/fw/self-learning-strategy.cpp
+++ b/daemon/fw/self-learning-strategy.cpp
@@ -42,7 +42,7 @@
 NFD_LOG_INIT(SelfLearningStrategy);
 NFD_REGISTER_STRATEGY(SelfLearningStrategy);
 
-const time::milliseconds SelfLearningStrategy::ROUTE_RENEW_LIFETIME(10_min);
+constexpr time::milliseconds ROUTE_RENEW_LIFETIME = 10_min;
 
 SelfLearningStrategy::SelfLearningStrategy(Forwarder& forwarder, const Name& name)
   : Strategy(forwarder)
@@ -191,11 +191,11 @@
   // (the PIT entry's expiry timer was set to 0 before dispatching)
   this->setExpiryTimer(pitEntry, 1_s);
 
-  runOnRibIoService([pitEntryWeak = weak_ptr<pit::Entry>{pitEntry}, inFaceId = inFace.getId(), data, this] {
+  runOnRibIoService([this, pitEntryWeak = weak_ptr<pit::Entry>{pitEntry}, inFaceId = inFace.getId(), data] {
     rib::Service::get().getRibManager().slFindAnn(data.getName(),
-      [pitEntryWeak, inFaceId, data, this] (std::optional<ndn::PrefixAnnouncement> paOpt) {
+      [this, pitEntryWeak, inFaceId, data] (std::optional<ndn::PrefixAnnouncement> paOpt) {
         if (paOpt) {
-          runOnMainIoService([pitEntryWeak, inFaceId, data, pa = std::move(*paOpt), this] {
+          runOnMainIoService([this, pitEntryWeak, inFaceId, data, pa = std::move(*paOpt)] {
             auto pitEntry = pitEntryWeak.lock();
             auto inFace = this->getFace(inFaceId);
             if (pitEntry && inFace) {
diff --git a/daemon/fw/self-learning-strategy.hpp b/daemon/fw/self-learning-strategy.hpp
index bb4f6f7..47e59af 100644
--- a/daemon/fw/self-learning-strategy.hpp
+++ b/daemon/fw/self-learning-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,
@@ -136,9 +136,6 @@
    */
   void
   renewRoute(const Name& name, FaceId inFaceId, time::milliseconds maxLifetime);
-
-private:
-  static const time::milliseconds ROUTE_RENEW_LIFETIME;
 };
 
 } // namespace fw
diff --git a/daemon/fw/strategy.hpp b/daemon/fw/strategy.hpp
index 4e162bd..570f219 100644
--- a/daemon/fw/strategy.hpp
+++ b/daemon/fw/strategy.hpp
@@ -52,11 +52,10 @@
   {
     BOOST_ASSERT(strategyName.size() > 1);
     BOOST_ASSERT(strategyName.at(-1).isVersion());
-    Registry& registry = getRegistry();
-    BOOST_ASSERT(registry.count(strategyName) == 0);
-    registry[strategyName] = [] (auto&&... args) {
+    auto r = getRegistry().insert_or_assign(strategyName, [] (auto&&... args) {
       return make_unique<S>(std::forward<decltype(args)>(args)...);
-    };
+    });
+    BOOST_VERIFY(r.second);
   }
 
   /** \return Whether a strategy instance can be created from \p instanceName
diff --git a/daemon/fw/unsolicited-data-policy.cpp b/daemon/fw/unsolicited-data-policy.cpp
index 8cf59d9..b29b827 100644
--- a/daemon/fw/unsolicited-data-policy.cpp
+++ b/daemon/fw/unsolicited-data-policy.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016,  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,
@@ -24,6 +24,7 @@
  */
 
 #include "unsolicited-data-policy.hpp"
+
 #include <boost/range/adaptor/map.hpp>
 #include <boost/range/algorithm/copy.hpp>
 
@@ -70,7 +71,7 @@
 NFD_REGISTER_UNSOLICITED_DATA_POLICY(DropAllUnsolicitedDataPolicy);
 
 UnsolicitedDataDecision
-DropAllUnsolicitedDataPolicy::decide(const Face& inFace, const Data& data) const
+DropAllUnsolicitedDataPolicy::decide(const Face&, const Data&) const
 {
   return UnsolicitedDataDecision::DROP;
 }
@@ -79,7 +80,7 @@
 NFD_REGISTER_UNSOLICITED_DATA_POLICY(AdmitLocalUnsolicitedDataPolicy);
 
 UnsolicitedDataDecision
-AdmitLocalUnsolicitedDataPolicy::decide(const Face& inFace, const Data& data) const
+AdmitLocalUnsolicitedDataPolicy::decide(const Face& inFace, const Data&) const
 {
   if (inFace.getScope() == ndn::nfd::FACE_SCOPE_LOCAL) {
     return UnsolicitedDataDecision::CACHE;
@@ -91,7 +92,7 @@
 NFD_REGISTER_UNSOLICITED_DATA_POLICY(AdmitNetworkUnsolicitedDataPolicy);
 
 UnsolicitedDataDecision
-AdmitNetworkUnsolicitedDataPolicy::decide(const Face& inFace, const Data& data) const
+AdmitNetworkUnsolicitedDataPolicy::decide(const Face& inFace, const Data&) const
 {
   if (inFace.getScope() == ndn::nfd::FACE_SCOPE_NON_LOCAL) {
     return UnsolicitedDataDecision::CACHE;
@@ -103,7 +104,7 @@
 NFD_REGISTER_UNSOLICITED_DATA_POLICY(AdmitAllUnsolicitedDataPolicy);
 
 UnsolicitedDataDecision
-AdmitAllUnsolicitedDataPolicy::decide(const Face& inFace, const Data& data) const
+AdmitAllUnsolicitedDataPolicy::decide(const Face&, const Data&) const
 {
   return UnsolicitedDataDecision::CACHE;
 }
diff --git a/daemon/fw/unsolicited-data-policy.hpp b/daemon/fw/unsolicited-data-policy.hpp
index 5d562a1..486903a 100644
--- a/daemon/fw/unsolicited-data-policy.hpp
+++ b/daemon/fw/unsolicited-data-policy.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,8 @@
 namespace nfd {
 namespace fw {
 
-/** \brief a decision made by UnsolicitedDataPolicy
+/**
+ * \brief Decision made by UnsolicitedDataPolicy
  */
 enum class UnsolicitedDataDecision {
   DROP, ///< the Data should be dropped
@@ -41,11 +42,12 @@
 std::ostream&
 operator<<(std::ostream& os, UnsolicitedDataDecision d);
 
-/** \brief determines how to process an unsolicited Data
+/**
+ * \brief Determines how to process an unsolicited Data packet
  *
- *  An incoming Data is unsolicited if it does not match any PIT entry.
- *  This class assists forwarding pipelines to decide whether to drop an unsolicited Data
- *  or admit it into the ContentStore.
+ * An incoming Data packet is *unsolicited* if it does not match any PIT entry.
+ * This class assists forwarding pipelines to decide whether to drop an unsolicited Data
+ * or admit it into the ContentStore.
  */
 class UnsolicitedDataPolicy : noncopyable
 {
@@ -61,9 +63,9 @@
   static void
   registerPolicy(const std::string& policyName = P::POLICY_NAME)
   {
-    Registry& registry = getRegistry();
-    BOOST_ASSERT(registry.count(policyName) == 0);
-    registry[policyName] = [] { return make_unique<P>(); };
+    BOOST_ASSERT(!policyName.empty());
+    auto r = getRegistry().insert_or_assign(policyName, [] { return make_unique<P>(); });
+    BOOST_VERIFY(r.second);
   }
 
   /** \return an UnsolicitedDataPolicy identified by \p policyName,
@@ -78,14 +80,15 @@
   getPolicyNames();
 
 private:
-  typedef std::function<unique_ptr<UnsolicitedDataPolicy>()> CreateFunc;
-  typedef std::map<std::string, CreateFunc> Registry; // indexed by policy name
+  using CreateFunc = std::function<unique_ptr<UnsolicitedDataPolicy>()>;
+  using Registry = std::map<std::string, CreateFunc>; // indexed by policy name
 
   static Registry&
   getRegistry();
 };
 
-/** \brief drops all unsolicited Data
+/**
+ * \brief Drops all unsolicited Data
  */
 class DropAllUnsolicitedDataPolicy final : public UnsolicitedDataPolicy
 {
@@ -97,7 +100,8 @@
   static const std::string POLICY_NAME;
 };
 
-/** \brief admits unsolicited Data from local faces
+/**
+ * \brief Admits unsolicited Data from local faces
  */
 class AdmitLocalUnsolicitedDataPolicy final : public UnsolicitedDataPolicy
 {
@@ -109,7 +113,8 @@
   static const std::string POLICY_NAME;
 };
 
-/** \brief admits unsolicited Data from non-local faces
+/**
+ * \brief Admits unsolicited Data from non-local faces
  */
 class AdmitNetworkUnsolicitedDataPolicy final : public UnsolicitedDataPolicy
 {
@@ -121,7 +126,8 @@
   static const std::string POLICY_NAME;
 };
 
-/** \brief admits all unsolicited Data
+/**
+ * \brief Admits all unsolicited Data
  */
 class AdmitAllUnsolicitedDataPolicy final : public UnsolicitedDataPolicy
 {
@@ -133,16 +139,18 @@
   static const std::string POLICY_NAME;
 };
 
-/** \brief The default UnsolicitedDataPolicy
+/**
+ * \brief The default UnsolicitedDataPolicy
  */
 using DefaultUnsolicitedDataPolicy = DropAllUnsolicitedDataPolicy;
 
 } // namespace fw
 } // namespace nfd
 
-/** \brief registers an unsolicited data policy
- *  \param P a subclass of nfd::fw::UnsolicitedDataPolicy;
- *           P::POLICY_NAME must be a string that contains policy name
+/**
+ * \brief Registers an unsolicited data policy
+ * \param P A subclass of nfd::fw::UnsolicitedDataPolicy. \p P must have a static data
+ *          member `POLICY_NAME` convertible to std::string that contains the policy name.
  */
 #define NFD_REGISTER_UNSOLICITED_DATA_POLICY(P)                     \
 static class NfdAuto ## P ## UnsolicitedDataPolicyRegistrationClass \
diff --git a/daemon/mgmt/cs-manager.cpp b/daemon/mgmt/cs-manager.cpp
index eaf2cda..36d7014 100644
--- a/daemon/mgmt/cs-manager.cpp
+++ b/daemon/mgmt/cs-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,
@@ -31,8 +31,6 @@
 
 namespace nfd {
 
-constexpr size_t CsManager::ERASE_LIMIT;
-
 CsManager::CsManager(Cs& cs, const ForwarderCounters& fwCounters,
                      Dispatcher& dispatcher, CommandAuthenticator& authenticator)
   : ManagerBase("cs", dispatcher, authenticator)
@@ -101,8 +99,7 @@
 }
 
 void
-CsManager::serveInfo(const Name& topPrefix, const Interest& interest,
-                     ndn::mgmt::StatusDatasetContext& context) const
+CsManager::serveInfo(const Name&, const Interest&, ndn::mgmt::StatusDatasetContext& context) const
 {
   ndn::nfd::CsInfo info;
   info.setCapacity(m_cs.getLimit());
diff --git a/daemon/mgmt/face-manager.cpp b/daemon/mgmt/face-manager.cpp
index 839a6fb..cc89061 100644
--- a/daemon/mgmt/face-manager.cpp
+++ b/daemon/mgmt/face-manager.cpp
@@ -260,7 +260,7 @@
                         const ndn::mgmt::CommandContinuation& done)
 {
   FaceId faceId = parameters.getFaceId();
-  if (faceId == 0) { // Self-update
+  if (faceId == face::INVALID_FACEID) { // Self-update
     auto incomingFaceIdTag = interest.getTag<lp::IncomingFaceIdTag>();
     if (incomingFaceIdTag == nullptr) {
       NFD_LOG_TRACE("unable to determine face for self-update");
diff --git a/daemon/mgmt/fib-manager.cpp b/daemon/mgmt/fib-manager.cpp
index f8a99d8..474d616 100644
--- a/daemon/mgmt/fib-manager.cpp
+++ b/daemon/mgmt/fib-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,
@@ -53,7 +53,7 @@
 }
 
 void
-FibManager::addNextHop(const Name& topPrefix, const Interest& interest,
+FibManager::addNextHop(const Name&, const Interest& interest,
                        ControlParameters parameters,
                        const ndn::mgmt::CommandContinuation& done)
 {
@@ -84,7 +84,7 @@
 }
 
 void
-FibManager::removeNextHop(const Name& topPrefix, const Interest& interest,
+FibManager::removeNextHop(const Name&, const Interest& interest,
                           ControlParameters parameters,
                           const ndn::mgmt::CommandContinuation& done)
 {
@@ -121,7 +121,7 @@
 }
 
 void
-FibManager::listEntries(const Name& topPrefix, const Interest& interest,
+FibManager::listEntries(const Name&, const Interest&,
                         ndn::mgmt::StatusDatasetContext& context)
 {
   for (const auto& entry : m_fib) {
@@ -142,9 +142,9 @@
 void
 FibManager::setFaceForSelfRegistration(const Interest& request, ControlParameters& parameters)
 {
-  bool isSelfRegistration = (parameters.getFaceId() == 0);
+  bool isSelfRegistration = parameters.getFaceId() == face::INVALID_FACEID;
   if (isSelfRegistration) {
-    shared_ptr<lp::IncomingFaceIdTag> incomingFaceIdTag = request.getTag<lp::IncomingFaceIdTag>();
+    auto incomingFaceIdTag = request.getTag<lp::IncomingFaceIdTag>();
     // NDNLPv2 says "application MUST be prepared to receive a packet without IncomingFaceId field",
     // but it's fine to assert IncomingFaceId is available, because InternalFace lives inside NFD
     // and is initialized synchronously with IncomingFaceId field enabled.
diff --git a/daemon/mgmt/rib-manager.cpp b/daemon/mgmt/rib-manager.cpp
index d66baea..24d52b7 100644
--- a/daemon/mgmt/rib-manager.cpp
+++ b/daemon/mgmt/rib-manager.cpp
@@ -42,11 +42,9 @@
 
 NFD_LOG_INIT(RibManager);
 
-static const std::string MGMT_MODULE_NAME = "rib";
-static const Name LOCALHOST_TOP_PREFIX = "/localhost/nfd";
-static const time::seconds ACTIVE_FACE_FETCH_INTERVAL = 5_min;
-
-const Name RibManager::LOCALHOP_TOP_PREFIX = "/localhop/nfd";
+const std::string MGMT_MODULE_NAME = "rib";
+const Name LOCALHOST_TOP_PREFIX = "/localhost/nfd";
+const time::seconds ACTIVE_FACE_FETCH_INTERVAL = 5_min;
 
 RibManager::RibManager(rib::Rib& rib, ndn::Face& face, ndn::KeyChain& keyChain,
                        ndn::nfd::Controller& nfdController, Dispatcher& dispatcher)
diff --git a/daemon/mgmt/rib-manager.hpp b/daemon/mgmt/rib-manager.hpp
index ac2a324..ec2394d 100644
--- a/daemon/mgmt/rib-manager.hpp
+++ b/daemon/mgmt/rib-manager.hpp
@@ -240,7 +240,7 @@
   onNotification(const ndn::nfd::FaceEventNotification& notification);
 
 public:
-  static const Name LOCALHOP_TOP_PREFIX;
+  static inline const Name LOCALHOP_TOP_PREFIX{"/localhop/nfd"};
 
 private:
   rib::Rib& m_rib;
diff --git a/daemon/mgmt/strategy-choice-manager.cpp b/daemon/mgmt/strategy-choice-manager.cpp
index 9be09d2..ea0c056 100644
--- a/daemon/mgmt/strategy-choice-manager.cpp
+++ b/daemon/mgmt/strategy-choice-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,
@@ -63,9 +63,7 @@
   }
 
   NFD_LOG_DEBUG("strategy-choice/set(" << prefix << "," << strategy << "): OK");
-  bool hasEntry = false;
-  Name instanceName;
-  std::tie(hasEntry, instanceName) = m_table.get(prefix);
+  auto [hasEntry, instanceName] = m_table.get(prefix);
   BOOST_ASSERT_MSG(hasEntry, "StrategyChoice entry must exist after StrategyChoice::insert");
   parameters.setStrategy(instanceName);
   return done(ControlResponse(200, "OK").setBody(parameters.wireEncode()));
diff --git a/daemon/mgmt/tables-config-section.cpp b/daemon/mgmt/tables-config-section.cpp
index f6adced..f693a73 100644
--- a/daemon/mgmt/tables-config-section.cpp
+++ b/daemon/mgmt/tables-config-section.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,
@@ -28,7 +28,7 @@
 
 namespace nfd {
 
-const size_t DEFAULT_CS_MAX_PACKETS = 65536;
+constexpr size_t DEFAULT_CS_MAX_PACKETS = 65536;
 
 TablesConfigSection::TablesConfigSection(Forwarder& forwarder)
   : m_forwarder(forwarder)
@@ -118,22 +118,19 @@
 void
 TablesConfigSection::processStrategyChoiceSection(const ConfigSection& section, bool isDryRun)
 {
-  using fw::Strategy;
-
   std::map<Name, Name> choices;
   for (const auto& prefixAndStrategy : section) {
     Name prefix(prefixAndStrategy.first);
     Name strategy(prefixAndStrategy.second.get_value<std::string>());
 
-    if (!Strategy::canCreate(strategy)) {
-      NDN_THROW(ConfigFile::Error(
-        "Unknown strategy '" + prefixAndStrategy.second.get_value<std::string>() +
-        "' for prefix '" + prefix.toUri() + "' in section 'strategy_choice'"));
+    if (!fw::Strategy::canCreate(strategy)) {
+      NDN_THROW(ConfigFile::Error("Unknown strategy '" + prefixAndStrategy.second.get_value<std::string>() +
+                                  "' for prefix '" + prefix.toUri() + "' in section 'strategy_choice'"));
     }
 
-    if (!choices.emplace(prefix, strategy).second) {
-      NDN_THROW(ConfigFile::Error(
-        "Duplicate strategy choice for prefix '" + prefix.toUri() + "' in section 'strategy_choice'"));
+    if (!choices.try_emplace(prefix, std::move(strategy)).second) {
+      NDN_THROW(ConfigFile::Error("Duplicate strategy choice for prefix '" + prefix.toUri() +
+                                  "' in section 'strategy_choice'"));
     }
   }
 
diff --git a/daemon/rib/readvertise/host-to-gateway-readvertise-policy.cpp b/daemon/rib/readvertise/host-to-gateway-readvertise-policy.cpp
index 89f11fd..5aa6e3b 100644
--- a/daemon/rib/readvertise/host-to-gateway-readvertise-policy.cpp
+++ b/daemon/rib/readvertise/host-to-gateway-readvertise-policy.cpp
@@ -33,8 +33,8 @@
 namespace nfd {
 namespace rib {
 
-static const name::Component IGNORE_COMPONENT("nrd");
-static const time::seconds DEFAULT_REFRESH_INTERVAL = 25_s;
+const name::Component IGNORE_COMPONENT("nrd");
+const time::seconds DEFAULT_REFRESH_INTERVAL = 25_s;
 
 HostToGatewayReadvertisePolicy::HostToGatewayReadvertisePolicy(const ndn::KeyChain& keyChain,
                                                                const ConfigSection& section)
diff --git a/daemon/rib/readvertise/readvertise.cpp b/daemon/rib/readvertise/readvertise.cpp
index addad72..ded568d 100644
--- a/daemon/rib/readvertise/readvertise.cpp
+++ b/daemon/rib/readvertise/readvertise.cpp
@@ -34,8 +34,8 @@
 
 NFD_LOG_INIT(Readvertise);
 
-const time::milliseconds Readvertise::RETRY_DELAY_MIN = 50_s;
-const time::milliseconds Readvertise::RETRY_DELAY_MAX = 1_h;
+constexpr time::milliseconds RETRY_DELAY_MIN = 50_s;
+constexpr time::milliseconds RETRY_DELAY_MAX = 1_h;
 
 static time::milliseconds
 randomizeTimer(time::milliseconds baseTimer)
@@ -74,20 +74,16 @@
     return;
   }
 
-  ReadvertisedRouteContainer::iterator rrIt;
-  bool isNew = false;
-  std::tie(rrIt, isNew) = m_rrs.emplace(action->prefix);
-
-  if (!isNew && rrIt->signer != action->signer) {
+  auto [rrIt, isNewRr] = m_rrs.emplace(action->prefix);
+  if (!isNewRr && rrIt->signer != action->signer) {
     NFD_LOG_WARN("add-route " << ribRoute.entry->getName() << '(' << ribRoute.route->faceId <<
-                  ',' << ribRoute.route->origin << ") readvertising-as " << action->prefix <<
+                 ',' << ribRoute.route->origin << ") readvertising-as " << action->prefix <<
                  " old-signer " << rrIt->signer << " new-signer " << action->signer);
   }
   rrIt->signer = action->signer;
 
-  RouteRrIndex::iterator indexIt;
-  std::tie(indexIt, isNew) = m_routeToRr.emplace(ribRoute, rrIt);
-  BOOST_ASSERT(isNew);
+  bool isNewInMap = m_routeToRr.try_emplace(ribRoute, rrIt).second;
+  BOOST_VERIFY(isNewInMap);
 
   if (rrIt->nRibRoutes++ > 0) {
     NFD_LOG_DEBUG("add-route " << ribRoute.entry->getName() << '(' << ribRoute.route->faceId <<
diff --git a/daemon/rib/readvertise/readvertise.hpp b/daemon/rib/readvertise/readvertise.hpp
index 871702f..aeaa823 100644
--- a/daemon/rib/readvertise/readvertise.hpp
+++ b/daemon/rib/readvertise/readvertise.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,
@@ -68,18 +68,14 @@
   withdraw(ReadvertisedRouteContainer::iterator rrIt);
 
 private:
-  /** \brief maps from RIB route to readvertised route derived from RIB route(s)
-   */
-  using RouteRrIndex = std::map<RibRouteRef, ReadvertisedRouteContainer::iterator>;
-
-  static const time::milliseconds RETRY_DELAY_MIN;
-  static const time::milliseconds RETRY_DELAY_MAX;
-
   unique_ptr<ReadvertisePolicy> m_policy;
   unique_ptr<ReadvertiseDestination> m_destination;
 
   ReadvertisedRouteContainer m_rrs;
-  RouteRrIndex m_routeToRr;
+  /**
+   * \brief maps from RIB route to readvertised route derived from RIB route(s)
+   */
+  std::map<RibRouteRef, ReadvertisedRouteContainer::iterator> m_routeToRr;
 
   signal::ScopedConnection m_addRouteConn;
   signal::ScopedConnection m_removeRouteConn;
diff --git a/daemon/rib/rib-entry.cpp b/daemon/rib/rib-entry.cpp
index 6acae09..1710aff 100644
--- a/daemon/rib/rib-entry.cpp
+++ b/daemon/rib/rib-entry.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,
@@ -271,7 +271,7 @@
 
   ndn::PrefixAnnouncement ann;
   ann.setAnnouncedName(m_name);
-  ann.setExpiration(ndn::clamp(
+  ann.setExpiration(std::clamp(
     time::duration_cast<time::milliseconds>(entryExpiry - time::steady_clock::now()),
     minExpiration, maxExpiration));
   return ann;
@@ -280,16 +280,12 @@
 std::ostream&
 operator<<(std::ostream& os, const RibEntry& entry)
 {
-  os << "RibEntry {\n";
-  os << "  Name: " << entry.getName() << "\n";
-
+  os << "RibEntry {\n"
+     << "  Name: " << entry.getName() << "\n";
   for (const Route& route : entry) {
     os << "  " << route << "\n";
   }
-
-  os << "}";
-
-  return os;
+  return os << "}";
 }
 
 } // namespace rib
diff --git a/daemon/rib/rib-entry.hpp b/daemon/rib/rib-entry.hpp
index 03cfc8c..79f1627 100644
--- a/daemon/rib/rib-entry.hpp
+++ b/daemon/rib/rib-entry.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,
@@ -33,19 +33,15 @@
 namespace nfd {
 namespace rib {
 
-/** \brief Represents a RIB entry, which contains one or more Routes with the same prefix.
+/**
+ * \brief Represents a RIB entry, which contains one or more Routes with the same prefix.
  */
 class RibEntry : public std::enable_shared_from_this<RibEntry>
 {
 public:
-  typedef std::list<Route> RouteList;
-  typedef RouteList::iterator iterator;
-  typedef RouteList::const_iterator const_iterator;
-
-  RibEntry()
-    : m_nRoutesWithCaptureSet(0)
-  {
-  }
+  using RouteList = std::list<Route>;
+  using iterator = RouteList::iterator;
+  using const_iterator = RouteList::const_iterator;
 
   void
   setName(const Name& prefix);
@@ -210,7 +206,7 @@
    *  If the number is greater than zero, a route on the namespace has its capture
    *  flag set which means the namespace should not inherit any routes.
    */
-  uint64_t m_nRoutesWithCaptureSet;
+  uint64_t m_nRoutesWithCaptureSet = 0;
 };
 
 inline void
@@ -228,7 +224,7 @@
 inline void
 RibEntry::setParent(shared_ptr<RibEntry> parent)
 {
-  m_parent = parent;
+  m_parent = std::move(parent);
 }
 
 inline shared_ptr<RibEntry>
diff --git a/daemon/rib/rib-update-batch.hpp b/daemon/rib/rib-update-batch.hpp
index f72a9e8..f3facb3 100644
--- a/daemon/rib/rib-update-batch.hpp
+++ b/daemon/rib/rib-update-batch.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,
@@ -33,20 +33,24 @@
 namespace nfd {
 namespace rib {
 
-typedef std::list<RibUpdate> RibUpdateList;
+using RibUpdateList = std::list<RibUpdate>;
 
-/** \brief Represents a collection of RibUpdates to be applied to a single FaceId.
+/**
+ * \brief Represents a collection of RibUpdates to be applied to a single FaceId.
  */
 class RibUpdateBatch
 {
 public:
-  typedef RibUpdateList::const_iterator const_iterator;
+  using const_iterator = RibUpdateList::const_iterator;
 
   explicit
   RibUpdateBatch(uint64_t faceId);
 
   uint64_t
-  getFaceId() const;
+  getFaceId() const
+  {
+    return m_faceId;
+  }
 
   void
   add(const RibUpdate& update);
@@ -65,12 +69,6 @@
   RibUpdateList m_updates;
 };
 
-inline uint64_t
-RibUpdateBatch::getFaceId() const
-{
-  return m_faceId;
-}
-
 } // namespace rib
 } // namespace nfd
 
diff --git a/daemon/rib/rib-update.cpp b/daemon/rib/rib-update.cpp
index 8efe327..be2636d 100644
--- a/daemon/rib/rib-update.cpp
+++ b/daemon/rib/rib-update.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2015,  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,13 +28,8 @@
 namespace nfd {
 namespace rib {
 
-RibUpdate::RibUpdate()
-{
-
-}
-
 std::ostream&
-operator<<(std::ostream& os, const RibUpdate::Action action)
+operator<<(std::ostream& os, RibUpdate::Action action)
 {
   switch (action) {
   case RibUpdate::REGISTER:
@@ -47,22 +42,18 @@
     os << "REMOVE_FACE";
     break;
   }
-
   return os;
 }
 
 std::ostream&
 operator<<(std::ostream& os, const RibUpdate& update)
 {
-  os << "RibUpdate {\n";
-  os << "  Name: " << update.getName() << "\n";
-  os << "  Action: " << update.getAction() << "\n";
-  os << "  " << update.getRoute() << "\n";
-  os << "}";
-
-  return os;
+  return os << "RibUpdate {\n"
+            << "  Name: " << update.getName() << "\n"
+            << "  Action: " << update.getAction() << "\n"
+            << "  " << update.getRoute() << "\n"
+            << "}";
 }
 
-
 } // namespace rib
 } // namespace nfd
diff --git a/daemon/rib/rib-update.hpp b/daemon/rib/rib-update.hpp
index ad5a390..bcdb342 100644
--- a/daemon/rib/rib-update.hpp
+++ b/daemon/rib/rib-update.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,
@@ -32,27 +32,23 @@
 namespace nfd {
 namespace rib {
 
-/** RibUpdate
- *  \brief represents a route that will be added to or removed from a namespace
- *
- *  \note This type is copyable so that it can be stored in STL containers.
+/**
+ * \brief Represents a route that will be added to or removed from a namespace
+ * \note This type is copyable so that it can be stored in STL containers.
  */
 class RibUpdate
 {
 public:
   enum Action {
-    REGISTER     = 0,
-    UNREGISTER   = 1,
-
-    /** \brief An update triggered by a face destruction notification
-     *
-     *  \note indicates a Route needs to be removed after a face is destroyed
+    REGISTER    = 0,
+    UNREGISTER  = 1,
+    /**
+     * \brief An update triggered by a face destruction notification
+     * \note indicates a Route needs to be removed after a face is destroyed
      */
-    REMOVE_FACE = 2
+    REMOVE_FACE = 2,
   };
 
-  RibUpdate();
-
   RibUpdate&
   setAction(Action action);
 
@@ -117,7 +113,7 @@
 }
 
 std::ostream&
-operator<<(std::ostream& os, const RibUpdate::Action action);
+operator<<(std::ostream& os, RibUpdate::Action action);
 
 std::ostream&
 operator<<(std::ostream& os, const RibUpdate& update);
diff --git a/daemon/rib/rib.cpp b/daemon/rib/rib.cpp
index a81e77a..fe4db0b 100644
--- a/daemon/rib/rib.cpp
+++ b/daemon/rib/rib.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,
@@ -96,10 +96,7 @@
   // Name prefix exists
   if (ribIt != m_rib.end()) {
     shared_ptr<RibEntry> entry(ribIt->second);
-
-    RibEntry::iterator entryIt;
-    bool didInsert = false;
-    std::tie(entryIt, didInsert) = entry->insertRoute(route);
+    auto [entryIt, didInsert] = entry->insertRoute(route);
 
     if (didInsert) {
       // The route was new and we successfully inserted it.
@@ -139,15 +136,13 @@
       parent->addChild(entry);
     }
 
-    RibEntryList children = findDescendants(prefix);
-
+    auto children = findDescendants(prefix);
     for (const auto& child : children) {
       if (child->getParent() == parent) {
         // Remove child from parent and inherit parent's child
         if (parent != nullptr) {
           parent->removeChild(child);
         }
-
         entry->addChild(child);
       }
     }
@@ -229,12 +224,12 @@
 {
   std::list<shared_ptr<RibEntry>> children;
 
-  RibTable::const_iterator it = m_rib.find(prefix);
+  auto it = m_rib.find(prefix);
   if (it != m_rib.end()) {
     ++it;
     for (; it != m_rib.end(); ++it) {
       if (prefix.isPrefixOf(it->first)) {
-        children.push_back((it->second));
+        children.push_back(it->second);
       }
       else {
         break;
@@ -250,9 +245,9 @@
 {
   std::list<shared_ptr<RibEntry>> children;
 
-  for (const auto& pair : m_rib) {
-    if (prefix.isPrefixOf(pair.first)) {
-      children.push_back(pair.second);
+  for (const auto& [name, ribEntry] : m_rib) {
+    if (prefix.isPrefixOf(name)) {
+      children.push_back(ribEntry);
     }
   }
 
@@ -268,7 +263,6 @@
   }
 
   shared_ptr<RibEntry> entry(it->second);
-
   shared_ptr<RibEntry> parent = entry->getParent();
 
   // Remove self from parent's children
@@ -293,7 +287,7 @@
 
   auto nextIt = m_rib.erase(it);
 
-  // do something after erasing an entry.
+  // do something after erasing an entry
   afterEraseEntry(entry->getName());
 
   return nextIt;
@@ -304,10 +298,9 @@
 {
   RouteSet ancestorRoutes(&sortRoutes);
 
-  shared_ptr<RibEntry> parent = entry.getParent();
-
+  auto parent = entry.getParent();
   while (parent != nullptr) {
-    for (const Route& route : parent->getRoutes()) {
+    for (const auto& route : parent->getRoutes()) {
       if (route.isChildInherit()) {
         ancestorRoutes.insert(route);
       }
@@ -328,10 +321,9 @@
 {
   RouteSet ancestorRoutes(&sortRoutes);
 
-  shared_ptr<RibEntry> parent = findParent(name);
-
+  auto parent = findParent(name);
   while (parent != nullptr) {
-    for (const Route& route : parent->getRoutes()) {
+    for (const auto& route : parent->getRoutes()) {
       if (route.isChildInherit()) {
         ancestorRoutes.insert(route);
       }
@@ -353,9 +345,7 @@
                       const Rib::UpdateFailureCallback& onFailure)
 {
   BOOST_ASSERT(m_fibUpdater != nullptr);
-
   addUpdateToQueue(update, onSuccess, onFailure);
-
   sendBatchFromQueue();
 }
 
@@ -372,11 +362,11 @@
 void
 Rib::beginRemoveFailedFaces(const std::set<uint64_t>& activeFaceIds)
 {
-  for (auto it = m_faceEntries.begin(); it != m_faceEntries.end(); ++it) {
-    if (activeFaceIds.count(it->first) > 0) {
+  for (const auto& [faceId, ribEntry] : m_faceEntries) {
+    if (activeFaceIds.count(faceId) > 0) {
       continue;
     }
-    enqueueRemoveFace(*it->second, it->first);
+    enqueueRemoveFace(*ribEntry, faceId);
   }
   sendBatchFromQueue();
 }
@@ -428,7 +418,6 @@
 
   auto fibSuccessCb = std::bind(&Rib::onFibUpdateSuccess, this, batch, _1, item.managerSuccessCallback);
   auto fibFailureCb = std::bind(&Rib::onFibUpdateFailure, this, item.managerFailureCallback, _1, _2);
-
   m_fibUpdater->computeAndSendFibUpdates(batch, fibSuccessCb, fibFailureCb);
 }
 
diff --git a/daemon/rib/rib.hpp b/daemon/rib/rib.hpp
index dbfdba8..f6912c3 100644
--- a/daemon/rib/rib.hpp
+++ b/daemon/rib/rib.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,
@@ -248,7 +248,7 @@
   UpdateQueue m_updateBatches;
   bool m_isUpdateInProgress = false;
 
-  friend class FibUpdater;
+  friend FibUpdater;
 };
 
 std::ostream&
diff --git a/daemon/rib/service.cpp b/daemon/rib/service.cpp
index 0c674b3..d850ed2 100644
--- a/daemon/rib/service.cpp
+++ b/daemon/rib/service.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,8 +43,6 @@
 
 NFD_LOG_INIT(RibService);
 
-Service* Service::s_instance = nullptr;
-
 const std::string CFG_RIB = "rib";
 const std::string CFG_LOCALHOST_SECURITY = "localhost_security";
 const std::string CFG_LOCALHOP_SECURITY = "localhop_security";
@@ -52,8 +50,8 @@
 const std::string CFG_PREFIX_PROPAGATE = "auto_prefix_propagate";
 const std::string CFG_READVERTISE_NLSR = "readvertise_nlsr";
 const Name READVERTISE_NLSR_PREFIX = "/localhost/nlsr";
-const uint64_t PROPAGATE_DEFAULT_COST = 15;
-const time::milliseconds PROPAGATE_DEFAULT_TIMEOUT = 10_s;
+constexpr uint64_t PROPAGATE_DEFAULT_COST = 15;
+constexpr time::milliseconds PROPAGATE_DEFAULT_TIMEOUT = 10_s;
 
 static ConfigSection
 loadConfigSectionFromFile(const std::string& filename)
@@ -64,10 +62,7 @@
   return config;
 }
 
-/**
- * \brief Look into the config file and construct appropriate transport to communicate with NFD
- * If NFD-RIB instance was initialized with config file, INFO format is assumed
- */
+// Look into NFD's config file and construct an appropriate transport to communicate with NFD.
 static shared_ptr<ndn::Transport>
 makeLocalNfdTransport(const ConfigSection& config)
 {
diff --git a/daemon/rib/service.hpp b/daemon/rib/service.hpp
index ca5f57b..8928011 100644
--- a/daemon/rib/service.hpp
+++ b/daemon/rib/service.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,
@@ -107,7 +107,7 @@
   applyConfig(const ConfigSection& section, const std::string& filename);
 
 private:
-  static Service* s_instance;
+  static inline Service* s_instance = nullptr;
 
   ndn::KeyChain& m_keyChain;
   ndn::Face m_face;
diff --git a/daemon/table/cs-policy-lru.cpp b/daemon/table/cs-policy-lru.cpp
index 56b21ec..1b477aa 100644
--- a/daemon/table/cs-policy-lru.cpp
+++ b/daemon/table/cs-policy-lru.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,
@@ -71,17 +71,15 @@
     BOOST_ASSERT(!m_queue.empty());
     EntryRef i = m_queue.front();
     m_queue.pop_front();
-    this->emitSignal(beforeEvict, i);
+    emitSignal(beforeEvict, i);
   }
 }
 
 void
 LruPolicy::insertToQueue(EntryRef i, bool isNewEntry)
 {
-  Queue::iterator it;
-  bool isNew = false;
   // push_back only if i does not exist
-  std::tie(it, isNew) = m_queue.push_back(i);
+  auto [it, isNew] = m_queue.push_back(i);
 
   BOOST_ASSERT(isNew == isNewEntry);
   if (!isNewEntry) {
diff --git a/daemon/table/cs-policy.cpp b/daemon/table/cs-policy.cpp
index b51aac1..6b24eb3 100644
--- a/daemon/table/cs-policy.cpp
+++ b/daemon/table/cs-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,
@@ -59,7 +59,7 @@
   return policyNames;
 }
 
-Policy::Policy(const std::string& policyName)
+Policy::Policy(std::string_view policyName)
   : m_policyName(policyName)
 {
 }
diff --git a/daemon/table/cs-policy.hpp b/daemon/table/cs-policy.hpp
index fb59990..9a4c6ed 100644
--- a/daemon/table/cs-policy.hpp
+++ b/daemon/table/cs-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,
@@ -33,7 +33,8 @@
 
 class Cs;
 
-/** \brief represents a CS replacement policy
+/**
+ * \brief Represents a CS replacement policy
  */
 class Policy : noncopyable
 {
@@ -42,9 +43,9 @@
   static void
   registerPolicy(const std::string& policyName = P::POLICY_NAME)
   {
-    Registry& registry = getRegistry();
-    BOOST_ASSERT(registry.count(policyName) == 0);
-    registry[policyName] = [] { return make_unique<P>(); };
+    BOOST_ASSERT(!policyName.empty());
+    auto r = getRegistry().insert_or_assign(policyName, [] { return make_unique<P>(); });
+    BOOST_VERIFY(r.second);
   }
 
   /** \return a cs::Policy identified by \p policyName,
@@ -59,9 +60,6 @@
   getPolicyNames();
 
 public:
-  explicit
-  Policy(const std::string& policyName);
-
   virtual
   ~Policy() = default;
 
@@ -190,6 +188,9 @@
   evictEntries() = 0;
 
 protected:
+  explicit
+  Policy(std::string_view policyName);
+
   DECLARE_SIGNAL_EMIT(beforeEvict)
 
 private: // registry
@@ -200,7 +201,7 @@
   getRegistry();
 
 private:
-  std::string m_policyName;
+  const std::string m_policyName;
   size_t m_limit;
   Cs* m_cs;
 };
diff --git a/daemon/table/cs.cpp b/daemon/table/cs.cpp
index b240e3d..5fc8301 100644
--- a/daemon/table/cs.cpp
+++ b/daemon/table/cs.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,
@@ -56,7 +56,7 @@
   NFD_LOG_DEBUG("insert " << data.getName());
 
   // recognize CachePolicy
-  shared_ptr<lp::CachePolicyTag> tag = data.getTag<lp::CachePolicyTag>();
+  auto tag = data.getTag<lp::CachePolicyTag>();
   if (tag != nullptr) {
     lp::CachePolicyType policy = tag->get().getPolicy();
     if (policy == lp::CachePolicyType::NO_CACHE) {
@@ -64,10 +64,8 @@
     }
   }
 
-  const_iterator it;
-  bool isNewEntry = false;
-  std::tie(it, isNewEntry) = m_table.emplace(data.shared_from_this(), isUnsolicited);
-  Entry& entry = const_cast<Entry&>(*it);
+  auto [it, isNewEntry] = m_table.emplace(data.shared_from_this(), isUnsolicited);
+  auto& entry = const_cast<Entry&>(*it);
 
   entry.updateFreshUntil();
 
@@ -76,7 +74,6 @@
     if (entry.isUnsolicited() && !isUnsolicited) {
       entry.clearUnsolicited();
     }
-
     m_policy->afterRefresh(it);
   }
   else {
@@ -89,7 +86,7 @@
 {
   auto first = m_table.lower_bound(prefix);
   auto last = m_table.end();
-  if (prefix.size() > 0) {
+  if (!prefix.empty()) {
     last = m_table.lower_bound(prefix.getSuccessor());
   }
   return {first, last};
diff --git a/daemon/table/dead-nonce-list.cpp b/daemon/table/dead-nonce-list.cpp
index 55bf346..6149fd6 100644
--- a/daemon/table/dead-nonce-list.cpp
+++ b/daemon/table/dead-nonce-list.cpp
@@ -32,17 +32,6 @@
 
 NFD_LOG_INIT(DeadNonceList);
 
-const time::nanoseconds DeadNonceList::DEFAULT_LIFETIME;
-const time::nanoseconds DeadNonceList::MIN_LIFETIME;
-const size_t DeadNonceList::INITIAL_CAPACITY;
-const size_t DeadNonceList::MIN_CAPACITY;
-const size_t DeadNonceList::MAX_CAPACITY;
-const DeadNonceList::Entry DeadNonceList::MARK;
-const size_t DeadNonceList::EXPECTED_MARK_COUNT;
-const double DeadNonceList::CAPACITY_UP;
-const double DeadNonceList::CAPACITY_DOWN;
-const size_t DeadNonceList::EVICT_LIMIT;
-
 DeadNonceList::DeadNonceList(time::nanoseconds lifetime)
   : m_lifetime(lifetime)
   , m_capacity(INITIAL_CAPACITY)
@@ -61,15 +50,15 @@
   m_adjustCapacityEvent = getScheduler().schedule(m_adjustCapacityInterval, [this] { adjustCapacity(); });
 
   BOOST_ASSERT_MSG(DEFAULT_LIFETIME >= MIN_LIFETIME, "DEFAULT_LIFETIME is too small");
-  static_assert(INITIAL_CAPACITY >= MIN_CAPACITY, "INITIAL_CAPACITY is too small");
-  static_assert(INITIAL_CAPACITY <= MAX_CAPACITY, "INITIAL_CAPACITY is too large");
+  static_assert(INITIAL_CAPACITY >= MIN_CAPACITY);
+  static_assert(INITIAL_CAPACITY <= MAX_CAPACITY);
   BOOST_ASSERT_MSG(static_cast<size_t>(MIN_CAPACITY * CAPACITY_UP) > MIN_CAPACITY,
                    "CAPACITY_UP must be able to increase from MIN_CAPACITY");
   BOOST_ASSERT_MSG(static_cast<size_t>(MAX_CAPACITY * CAPACITY_DOWN) < MAX_CAPACITY,
                    "CAPACITY_DOWN must be able to decrease from MAX_CAPACITY");
   BOOST_ASSERT_MSG(CAPACITY_UP > 1.0, "CAPACITY_UP must adjust up");
   BOOST_ASSERT_MSG(CAPACITY_DOWN < 1.0, "CAPACITY_DOWN must adjust down");
-  static_assert(EVICT_LIMIT >= 1, "EVICT_LIMIT must be at least 1");
+  static_assert(EVICT_LIMIT >= 1);
 }
 
 size_t
diff --git a/daemon/table/fib-entry.cpp b/daemon/table/fib-entry.cpp
index ade4c9f..71c2516 100644
--- a/daemon/table/fib-entry.cpp
+++ b/daemon/table/fib-entry.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,
@@ -62,7 +62,7 @@
   it->setCost(cost);
   this->sortNextHops();
 
-  return std::make_pair(it, isNew);
+  return {it, isNew};
 }
 
 bool
diff --git a/daemon/table/fib-entry.hpp b/daemon/table/fib-entry.hpp
index 7460eda..facf248 100644
--- a/daemon/table/fib-entry.hpp
+++ b/daemon/table/fib-entry.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,9 @@
  */
 using NextHopList = std::vector<NextHop>;
 
-/** \brief represents a FIB entry
+/**
+ * \brief Represents an entry in the FIB.
+ * \sa Fib
  */
 class Entry : noncopyable
 {
@@ -115,8 +117,8 @@
 
   name_tree::Entry* m_nameTreeEntry = nullptr;
 
-  friend class name_tree::Entry;
-  friend class Fib;
+  friend name_tree::Entry;
+  friend Fib;
 };
 
 } // namespace fib
diff --git a/daemon/table/fib.cpp b/daemon/table/fib.cpp
index 99892e6..c6c8f2c 100644
--- a/daemon/table/fib.cpp
+++ b/daemon/table/fib.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,
@@ -135,10 +135,7 @@
 void
 Fib::addOrUpdateNextHop(Entry& entry, Face& face, uint64_t cost)
 {
-  NextHopList::iterator it;
-  bool isNew;
-  std::tie(it, isNew) = entry.addOrUpdateNextHop(face, cost);
-
+  auto [it, isNew] = entry.addOrUpdateNextHop(face, cost);
   if (isNew)
     this->afterNewNextHop(entry.getPrefix(), *it);
 }
diff --git a/daemon/table/fib.hpp b/daemon/table/fib.hpp
index a4b688f..6073533 100644
--- a/daemon/table/fib.hpp
+++ b/daemon/table/fib.hpp
@@ -36,6 +36,7 @@
 namespace measurements {
 class Entry;
 } // namespace measurements
+
 namespace pit {
 class Entry;
 } // namespace pit
diff --git a/daemon/table/measurements-entry.hpp b/daemon/table/measurements-entry.hpp
index fa80327..a70f6e0 100644
--- a/daemon/table/measurements-entry.hpp
+++ b/daemon/table/measurements-entry.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,
@@ -36,7 +36,11 @@
 
 namespace measurements {
 
-/** \brief Represents a Measurements entry
+class Measurements;
+
+/**
+ * \brief Represents an entry in the %Measurements table.
+ * \sa Measurements
  */
 class Entry : public StrategyInfoHost, noncopyable
 {
@@ -60,8 +64,8 @@
 
   name_tree::Entry* m_nameTreeEntry = nullptr;
 
-  friend class Measurements;
-  friend class name_tree::Entry;
+  friend Measurements;
+  friend name_tree::Entry;
 };
 
 } // namespace measurements
diff --git a/daemon/table/pit-entry.hpp b/daemon/table/pit-entry.hpp
index 9e4a357..e088e70 100644
--- a/daemon/table/pit-entry.hpp
+++ b/daemon/table/pit-entry.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,
@@ -39,21 +39,26 @@
 
 namespace pit {
 
-/** \brief An unordered collection of in-records
+/**
+ * \brief An unordered collection of in-records
  */
-typedef std::list<InRecord> InRecordCollection;
+using InRecordCollection = std::list<InRecord>;
 
-/** \brief An unordered collection of out-records
+/**
+ * \brief An unordered collection of out-records
  */
-typedef std::list<OutRecord> OutRecordCollection;
+using OutRecordCollection = std::list<OutRecord>;
 
-/** \brief An Interest table entry
+/**
+ * \brief Represents an entry in the %Interest table (PIT).
  *
- *  An Interest table entry represents either a pending Interest or a recently satisfied Interest.
- *  Each entry contains a collection of in-records, a collection of out-records,
- *  and two timers used in forwarding pipelines.
- *  In addition, the entry, in-records, and out-records are subclasses of StrategyInfoHost,
- *  which allows forwarding strategy to store arbitrary information on them.
+ * An Interest table entry represents either a pending Interest or a recently satisfied Interest.
+ * Each entry contains a collection of in-records, a collection of out-records,
+ * and two timers used in forwarding pipelines.
+ * In addition, the entry, in-records, and out-records are subclasses of StrategyInfoHost,
+ * which allows forwarding strategy to store arbitrary information on them.
+ *
+ * \sa Pit
  */
 class Entry : public StrategyInfoHost, noncopyable
 {
@@ -238,7 +243,7 @@
 
   name_tree::Entry* m_nameTreeEntry = nullptr;
 
-  friend class name_tree::Entry;
+  friend name_tree::Entry;
 };
 
 } // namespace pit
diff --git a/daemon/table/pit-face-record.cpp b/daemon/table/pit-face-record.cpp
index 639f424..4674b8e 100644
--- a/daemon/table/pit-face-record.cpp
+++ b/daemon/table/pit-face-record.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,7 +29,7 @@
 namespace pit {
 
 // Impose a maximum lifetime to prevent integer overflow when calculating m_expiry.
-static const time::milliseconds MAX_LIFETIME{10_days};
+const time::milliseconds MAX_LIFETIME = 10_days;
 
 void
 FaceRecord::update(const Interest& interest)
diff --git a/daemon/table/pit-iterator.hpp b/daemon/table/pit-iterator.hpp
index 35e02c5..b788e3c 100644
--- a/daemon/table/pit-iterator.hpp
+++ b/daemon/table/pit-iterator.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,
@@ -48,7 +48,7 @@
    *  \param iPitEntry make this iterator to dereference to the i-th PIT entry in name tree entry
    */
   explicit
-  Iterator(const NameTree::const_iterator& ntIt = NameTree::const_iterator(), size_t iPitEntry = 0);
+  Iterator(const NameTree::const_iterator& ntIt = {}, size_t iPitEntry = 0);
 
   const Entry&
   operator*() const
diff --git a/daemon/table/pit.hpp b/daemon/table/pit.hpp
index c998a4d..b44dce8 100644
--- a/daemon/table/pit.hpp
+++ b/daemon/table/pit.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,
@@ -99,7 +99,7 @@
   deleteInOutRecords(Entry* entry, const Face& face);
 
 public: // enumeration
-  typedef Iterator const_iterator;
+  using const_iterator = Iterator;
 
   /** \return an iterator to the beginning
    *  \note Iteration order is implementation-defined.
diff --git a/daemon/table/strategy-choice-entry.hpp b/daemon/table/strategy-choice-entry.hpp
index f64d332..ac59234 100644
--- a/daemon/table/strategy-choice-entry.hpp
+++ b/daemon/table/strategy-choice-entry.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,
@@ -40,7 +40,9 @@
 
 namespace strategy_choice {
 
-/** \brief Represents a Strategy Choice entry
+/**
+ * \brief Represents an entry in the %Strategy %Choice table.
+ * \sa StrategyChoice
  */
 class Entry : noncopyable
 {
@@ -80,7 +82,7 @@
   unique_ptr<fw::Strategy> m_strategy;
 
   name_tree::Entry* m_nameTreeEntry = nullptr;
-  friend class name_tree::Entry;
+  friend name_tree::Entry;
 };
 
 } // namespace strategy_choice
