Simplify some code with Boost.Operators

Change-Id: Ic873bcbaf6be00d5c35601cfc8090df534d815ee
diff --git a/core/network.hpp b/core/network.hpp
index 227ccfc..0cf12cd 100644
--- a/core/network.hpp
+++ b/core/network.hpp
@@ -27,11 +27,13 @@
 #define NFD_CORE_NETWORK_HPP
 
 #include <boost/asio/ip/address.hpp>
+#include <boost/operators.hpp>
+
 #include <string_view>
 
 namespace nfd {
 
-class Network
+class Network : private boost::equality_comparable<Network>
 {
 public:
   Network();
@@ -62,12 +64,6 @@
            lhs.m_maxAddress == rhs.m_maxAddress;
   }
 
-  friend bool
-  operator!=(const Network& lhs, const Network& rhs) noexcept
-  {
-    return !(lhs == rhs);
-  }
-
   friend std::ostream&
   operator<<(std::ostream& os, const Network& network);
 
diff --git a/daemon/common/counter.hpp b/daemon/common/counter.hpp
index 805ebdf..eeb98dc 100644
--- a/daemon/common/counter.hpp
+++ b/daemon/common/counter.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2023,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -34,15 +34,15 @@
  * \brief Represents a counter that encloses an integer value.
  *
  * SimpleCounter is noncopyable, because increment should be called on the counter,
- * not a copy of it; it's implicitly convertible to an integral type to be observed.
+ * not a copy of it. It's implicitly convertible to an integral type to be observed.
  */
 class SimpleCounter : noncopyable
 {
 public:
-  typedef uint64_t rep;
+  using rep = uint64_t;
 
   /**
-   * \brief Observe the counter's value.
+   * \brief Return the counter's value.
    */
   operator rep() const noexcept
   {
@@ -62,14 +62,16 @@
   rep m_value = 0;
 };
 
-/** \brief Represents a counter of number of packets.
+/**
+ * \brief Represents a counter of number of packets.
  *
- *  \warning The counter value may wrap after exceeding the range of underlying integer type.
+ * \warning The counter value may wrap after exceeding the range of the underlying integer type.
  */
 class PacketCounter : public SimpleCounter
 {
 public:
-  /** \brief Increment the counter by one.
+  /**
+   * \brief Increment the counter by one.
    */
   PacketCounter&
   operator++() noexcept
@@ -77,17 +79,18 @@
     ++m_value;
     return *this;
   }
-  // postfix ++ operator is not provided because it's not needed
 };
 
-/** \brief Represents a counter of number of bytes.
+/**
+ * \brief Represents a counter of number of bytes.
  *
- *  \warning The counter value may wrap after exceeding the range of underlying integer type.
+ * \warning The counter value may wrap after exceeding the range of the underlying integer type.
  */
 class ByteCounter : public SimpleCounter
 {
 public:
-  /** \brief Increase the counter.
+  /**
+   * \brief Increase the counter.
    */
   ByteCounter&
   operator+=(rep n) noexcept
@@ -97,16 +100,17 @@
   }
 };
 
-/** \brief Provides a counter that observes the size of a table.
- *  \tparam T a type that provides a size() const member function
+/**
+ * \brief Provides a counter that observes the size of a table.
+ * \tparam T a type that provides a `size()` const member function
  *
- *  if table not specified in constructor, it can be added later by invoking observe()
+ * If the table is not specified in the constructor, it can be added later by calling observe().
  */
 template<typename T>
 class SizeCounter : noncopyable
 {
 public:
-  typedef size_t Rep;
+  using rep = size_t;
 
   explicit constexpr
   SizeCounter(const T* table = nullptr) noexcept
@@ -120,16 +124,17 @@
     m_table = table;
   }
 
-  /** \brief Observe the counter.
+  /**
+   * \brief Return the counter's value, i.e., the current size of the table being observed.
    */
-  operator Rep() const
+  operator rep() const
   {
     BOOST_ASSERT(m_table != nullptr);
     return m_table->size();
   }
 
 private:
-  const T* m_table;
+  const T* m_table = nullptr;
 };
 
 } // namespace nfd
diff --git a/daemon/face/network-predicate.hpp b/daemon/face/network-predicate.hpp
index 8e0bd52..3405f7c 100644
--- a/daemon/face/network-predicate.hpp
+++ b/daemon/face/network-predicate.hpp
@@ -28,12 +28,14 @@
 
 #include "core/common.hpp"
 
+#include <boost/operators.hpp>
 #include <boost/property_tree/ptree_fwd.hpp>
+
 #include <ndn-cxx/net/network-interface.hpp>
 
 namespace nfd::face {
 
-class NetworkPredicateBase
+class NetworkPredicateBase : private boost::equality_comparable<NetworkPredicateBase>
 {
 public:
   NetworkPredicateBase();
@@ -78,12 +80,6 @@
            lhs.m_blacklist == rhs.m_blacklist;
   }
 
-  friend bool
-  operator!=(const NetworkPredicateBase& lhs, const NetworkPredicateBase& rhs)
-  {
-    return !(lhs == rhs);
-  }
-
 NFD_PUBLIC_WITH_TESTS_ELSE_PROTECTED:
   std::set<std::string> m_whitelist;
   std::set<std::string> m_blacklist;
diff --git a/daemon/fw/face-table.cpp b/daemon/fw/face-table.cpp
index 75b1190..fe3a6ab 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-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2023,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -28,12 +28,8 @@
 #include "common/logger.hpp"
 #include "face/channel.hpp"
 
-#include <ndn-cxx/util/concepts.hpp>
-
 namespace nfd {
 
-NDN_CXX_ASSERT_FORWARD_ITERATOR(FaceTable::const_iterator);
-
 NFD_LOG_INIT(FaceTable);
 
 Face*
diff --git a/daemon/rib/fib-update.hpp b/daemon/rib/fib-update.hpp
index fd80b89..edf6c00 100644
--- a/daemon/rib/fib-update.hpp
+++ b/daemon/rib/fib-update.hpp
@@ -28,12 +28,14 @@
 
 #include "core/common.hpp"
 
+#include <boost/operators.hpp>
+
 namespace nfd::rib {
 
 /**
  * \brief Represents a FIB update.
  */
-class FibUpdate
+class FibUpdate : private boost::equality_comparable<FibUpdate>
 {
 public:
   enum Action {
@@ -57,12 +59,6 @@
            lhs.action == rhs.action;
   }
 
-  friend bool
-  operator!=(const FibUpdate& lhs, const FibUpdate& rhs) noexcept
-  {
-    return !(lhs == rhs);
-  }
-
 public:
   Name name;
   uint64_t faceId = 0;
diff --git a/daemon/rib/readvertise/readvertised-route.hpp b/daemon/rib/readvertise/readvertised-route.hpp
index a57fe70..bc2d8c1 100644
--- a/daemon/rib/readvertise/readvertised-route.hpp
+++ b/daemon/rib/readvertise/readvertised-route.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2023,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -33,7 +33,8 @@
 
 namespace nfd::rib {
 
-/** \brief State of a readvertised route.
+/**
+ * \brief State of a readvertised route.
  */
 class ReadvertisedRoute : noncopyable
 {
@@ -41,25 +42,23 @@
   explicit
   ReadvertisedRoute(const Name& prefix)
     : prefix(prefix)
-    , nRibRoutes(0)
-    , retryDelay(0)
   {
   }
 
+  friend bool
+  operator<(const ReadvertisedRoute& lhs, const ReadvertisedRoute& rhs)
+  {
+    return lhs.prefix < rhs.prefix;
+  }
+
 public:
   Name prefix; ///< readvertised prefix
   mutable ndn::security::SigningInfo signer; ///< signer for commands
-  mutable size_t nRibRoutes; ///< number of RIB routes that cause the readvertisement
-  mutable time::milliseconds retryDelay; ///< retry interval (not used for refresh)
+  mutable size_t nRibRoutes = 0; ///< number of RIB routes that cause the readvertisement
+  mutable time::milliseconds retryDelay = 0_ms; ///< retry interval (not used for refresh)
   mutable scheduler::ScopedEventId retryEvt; ///< retry or refresh event
 };
 
-inline bool
-operator<(const ReadvertisedRoute& lhs, const ReadvertisedRoute& rhs)
-{
-  return lhs.prefix < rhs.prefix;
-}
-
 using ReadvertisedRouteContainer = std::set<ReadvertisedRoute>;
 
 } // namespace nfd::rib
diff --git a/daemon/rib/rib.cpp b/daemon/rib/rib.cpp
index 952cc9a..7288c9a 100644
--- a/daemon/rib/rib.cpp
+++ b/daemon/rib/rib.cpp
@@ -31,13 +31,6 @@
 
 NFD_LOG_INIT(Rib);
 
-bool
-operator<(const RibRouteRef& lhs, const RibRouteRef& rhs)
-{
-  return std::tie(lhs.entry->getName(), lhs.route->faceId, lhs.route->origin) <
-         std::tie(rhs.entry->getName(), rhs.route->faceId, rhs.route->origin);
-}
-
 static inline bool
 sortRoutes(const Route& lhs, const Route& rhs)
 {
diff --git a/daemon/rib/rib.hpp b/daemon/rib/rib.hpp
index ddfa591..795222c 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-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2023,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -37,16 +37,21 @@
 
 class FibUpdater;
 
-/** \brief References a route.
+/**
+ * \brief References a route.
  */
 struct RibRouteRef
 {
   shared_ptr<RibEntry> entry;
   RibEntry::const_iterator route;
-};
 
-bool
-operator<(const RibRouteRef& lhs, const RibRouteRef& rhs);
+  friend bool
+  operator<(const RibRouteRef& lhs, const RibRouteRef& rhs) noexcept
+  {
+    return std::tie(lhs.entry->getName(), lhs.route->faceId, lhs.route->origin) <
+           std::tie(rhs.entry->getName(), rhs.route->faceId, rhs.route->origin);
+  }
+};
 
 /**
  * \brief Represents the Routing Information Base.
diff --git a/daemon/rib/route.hpp b/daemon/rib/route.hpp
index 5179dbf..f460487 100644
--- a/daemon/rib/route.hpp
+++ b/daemon/rib/route.hpp
@@ -40,7 +40,7 @@
 /**
  * \brief Represents a route for a name prefix.
  */
-class Route : public ndn::nfd::RouteFlagsTraits<Route>
+class Route : public ndn::nfd::RouteFlagsTraits<Route>, private boost::equality_comparable<Route>
 {
 public:
   /** \brief Default constructor.
@@ -89,12 +89,6 @@
            lhs.announcement == rhs.announcement;
   }
 
-  friend bool
-  operator!=(const Route& lhs, const Route& rhs)
-  {
-    return !(lhs == rhs);
-  }
-
 public:
   uint64_t faceId = 0;
   ndn::nfd::RouteOrigin origin = ndn::nfd::ROUTE_ORIGIN_APP;
diff --git a/daemon/table/fib.cpp b/daemon/table/fib.cpp
index f30b976..87e180a 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-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2023,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -27,12 +27,8 @@
 #include "pit-entry.hpp"
 #include "measurements-entry.hpp"
 
-#include <ndn-cxx/util/concepts.hpp>
-
 namespace nfd::fib {
 
-NDN_CXX_ASSERT_FORWARD_ITERATOR(Fib::const_iterator);
-
 const unique_ptr<Entry> Fib::s_emptyEntry = make_unique<Entry>(Name());
 
 static inline bool
diff --git a/daemon/table/name-tree-iterator.cpp b/daemon/table/name-tree-iterator.cpp
index 24c1422..b085bb7 100644
--- a/daemon/table/name-tree-iterator.cpp
+++ b/daemon/table/name-tree-iterator.cpp
@@ -27,14 +27,8 @@
 #include "name-tree.hpp"
 #include "common/logger.hpp"
 
-#include <boost/range/concepts.hpp>
-#include <ndn-cxx/util/concepts.hpp>
-
 namespace nfd::name_tree {
 
-NDN_CXX_ASSERT_FORWARD_ITERATOR(Iterator);
-BOOST_CONCEPT_ASSERT((boost::ForwardRangeConcept<Range>));
-
 NFD_LOG_INIT(NameTreeIterator);
 
 Iterator::Iterator() = default;
@@ -56,14 +50,6 @@
   return *this;
 }
 
-Iterator
-Iterator::operator++(int)
-{
-  Iterator copy = *this;
-  this->operator++();
-  return copy;
-}
-
 std::ostream&
 operator<<(std::ostream& os, const Iterator& i)
 {
diff --git a/daemon/table/name-tree-iterator.hpp b/daemon/table/name-tree-iterator.hpp
index fef3e6e..2399826 100644
--- a/daemon/table/name-tree-iterator.hpp
+++ b/daemon/table/name-tree-iterator.hpp
@@ -28,6 +28,7 @@
 
 #include "name-tree-hashtable.hpp"
 
+#include <boost/operators.hpp>
 #include <boost/range/iterator_range_core.hpp>
 
 namespace nfd::name_tree {
@@ -74,15 +75,9 @@
 /**
  * \brief NameTree iterator.
  */
-class Iterator
+class Iterator : public boost::forward_iterator_helper<Iterator, const Entry>
 {
 public:
-  using iterator_category = std::forward_iterator_tag;
-  using value_type        = const Entry;
-  using difference_type   = std::ptrdiff_t;
-  using pointer           = value_type*;
-  using reference         = value_type&;
-
   Iterator();
 
   Iterator(shared_ptr<EnumerationImpl> impl, const Entry* ref);
@@ -94,31 +89,15 @@
     return *m_entry;
   }
 
-  const Entry*
-  operator->() const noexcept
-  {
-    BOOST_ASSERT(m_impl != nullptr);
-    return m_entry;
-  }
-
   Iterator&
   operator++();
 
-  Iterator
-  operator++(int);
-
   friend bool
   operator==(const Iterator& lhs, const Iterator& rhs) noexcept
   {
     return lhs.m_entry == rhs.m_entry;
   }
 
-  friend bool
-  operator!=(const Iterator& lhs, const Iterator& rhs) noexcept
-  {
-    return !(lhs == rhs);
-  }
-
 private:
   /** \brief Enumeration implementation; nullptr for end iterator.
    */
diff --git a/daemon/table/pit-iterator.cpp b/daemon/table/pit-iterator.cpp
index f0d0c8a..f3680f8 100644
--- a/daemon/table/pit-iterator.cpp
+++ b/daemon/table/pit-iterator.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2023,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -25,18 +25,8 @@
 
 #include "pit-iterator.hpp"
 
-#include <ndn-cxx/util/concepts.hpp>
-
 namespace nfd::pit {
 
-NDN_CXX_ASSERT_FORWARD_ITERATOR(Iterator);
-
-Iterator::Iterator(const NameTree::const_iterator& ntIt, size_t iPitEntry)
-  : m_ntIt(ntIt)
-  , m_iPitEntry(iPitEntry)
-{
-}
-
 Iterator&
 Iterator::operator++()
 {
@@ -48,16 +38,7 @@
     m_iPitEntry = 0;
     BOOST_ASSERT(m_ntIt == NameTree::const_iterator() || m_ntIt->hasPitEntries());
   }
-
   return *this;
 }
 
-Iterator
-Iterator::operator++(int)
-{
-  Iterator copy = *this;
-  this->operator++();
-  return copy;
-}
-
 } // namespace nfd::pit
diff --git a/daemon/table/pit-iterator.hpp b/daemon/table/pit-iterator.hpp
index bfe0e8e..e1647ff 100644
--- a/daemon/table/pit-iterator.hpp
+++ b/daemon/table/pit-iterator.hpp
@@ -34,42 +34,32 @@
 /**
  * \brief PIT iterator.
  */
-class Iterator
+class Iterator : public boost::forward_iterator_helper<Iterator, const Entry>
 {
 public:
-  using iterator_category = std::forward_iterator_tag;
-  using value_type        = const Entry;
-  using difference_type   = std::ptrdiff_t;
-  using pointer           = value_type*;
-  using reference         = value_type&;
-
-  /** \brief Constructor.
-   *  \param ntIt a name tree iterator that visits name tree entries with one or more PIT entries
-   *  \param iPitEntry make this iterator to dereference to the i-th PIT entry in name tree entry
+  /**
+   * \brief Constructor.
+   * \param ntIt a name tree iterator that visits name tree entries with one or more PIT entries
+   * \param iPitEntry make this iterator to dereference to the i-th PIT entry in name tree entry
    */
   explicit
-  Iterator(const NameTree::const_iterator& ntIt = {}, size_t iPitEntry = 0);
-
-  const Entry&
-  operator*() const
+  Iterator(const NameTree::const_iterator& ntIt = {}, size_t iPitEntry = 0)
+    : m_ntIt(ntIt)
+    , m_iPitEntry(iPitEntry)
   {
-    return *this->operator->();
   }
 
-  const shared_ptr<Entry>&
-  operator->() const
+  const Entry&
+  operator*() const noexcept
   {
     BOOST_ASSERT(m_ntIt != NameTree::const_iterator());
     BOOST_ASSERT(m_iPitEntry < m_ntIt->getPitEntries().size());
-    return m_ntIt->getPitEntries()[m_iPitEntry];
+    return *m_ntIt->getPitEntries()[m_iPitEntry];
   }
 
   Iterator&
   operator++();
 
-  Iterator
-  operator++(int);
-
   friend bool
   operator==(const Iterator& lhs, const Iterator& rhs) noexcept
   {
@@ -77,12 +67,6 @@
            lhs.m_iPitEntry == rhs.m_iPitEntry;
   }
 
-  friend bool
-  operator!=(const Iterator& lhs, const Iterator& rhs) noexcept
-  {
-    return !(lhs == rhs);
-  }
-
 private:
   NameTree::const_iterator m_ntIt; ///< current name tree entry
   size_t m_iPitEntry; ///< current PIT entry within m_ntIt->getPitEntries()
diff --git a/daemon/table/strategy-choice.cpp b/daemon/table/strategy-choice.cpp
index cefb245..c7b7a1a 100644
--- a/daemon/table/strategy-choice.cpp
+++ b/daemon/table/strategy-choice.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2023,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -30,12 +30,8 @@
 #include "common/logger.hpp"
 #include "fw/strategy.hpp"
 
-#include <ndn-cxx/util/concepts.hpp>
-
 namespace nfd::strategy_choice {
 
-NDN_CXX_ASSERT_FORWARD_ITERATOR(StrategyChoice::const_iterator);
-
 NFD_LOG_INIT(StrategyChoice);
 
 using fw::Strategy;
diff --git a/tests/daemon/fw/face-table.t.cpp b/tests/daemon/fw/face-table.t.cpp
index a76ceed..3b034fc 100644
--- a/tests/daemon/fw/face-table.t.cpp
+++ b/tests/daemon/fw/face-table.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2023,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -29,8 +29,12 @@
 #include "tests/daemon/global-io-fixture.hpp"
 #include "tests/daemon/face/dummy-face.hpp"
 
+#include <ndn-cxx/util/concepts.hpp>
+
 namespace nfd::tests {
 
+NDN_CXX_ASSERT_FORWARD_ITERATOR(FaceTable::const_iterator);
+
 BOOST_AUTO_TEST_SUITE(Fw)
 BOOST_FIXTURE_TEST_SUITE(TestFaceTable, GlobalIoFixture)
 
diff --git a/tests/daemon/table/fib.t.cpp b/tests/daemon/table/fib.t.cpp
index e0246db..65b1280 100644
--- a/tests/daemon/table/fib.t.cpp
+++ b/tests/daemon/table/fib.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2023,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -31,10 +31,14 @@
 #include "tests/daemon/global-io-fixture.hpp"
 #include "tests/daemon/face/dummy-face.hpp"
 
+#include <ndn-cxx/util/concepts.hpp>
+
 namespace nfd::tests {
 
 using namespace nfd::fib;
 
+NDN_CXX_ASSERT_FORWARD_ITERATOR(Fib::const_iterator);
+
 BOOST_AUTO_TEST_SUITE(Table)
 BOOST_FIXTURE_TEST_SUITE(TestFib, GlobalIoFixture)
 
diff --git a/tests/daemon/table/name-tree.t.cpp b/tests/daemon/table/name-tree.t.cpp
index ba87cf4..ee02572 100644
--- a/tests/daemon/table/name-tree.t.cpp
+++ b/tests/daemon/table/name-tree.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2023,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -30,10 +30,16 @@
 
 #include <unordered_set>
 
+#include <boost/range/concepts.hpp>
+#include <ndn-cxx/util/concepts.hpp>
+
 namespace nfd::tests {
 
 using namespace nfd::name_tree;
 
+NDN_CXX_ASSERT_FORWARD_ITERATOR(NameTree::const_iterator);
+BOOST_CONCEPT_ASSERT((boost::ForwardRangeConcept<Range>));
+
 BOOST_AUTO_TEST_SUITE(Table)
 BOOST_FIXTURE_TEST_SUITE(TestNameTree, GlobalIoFixture)
 
diff --git a/tests/daemon/table/pit.t.cpp b/tests/daemon/table/pit.t.cpp
index b52ac0e..05b8168 100644
--- a/tests/daemon/table/pit.t.cpp
+++ b/tests/daemon/table/pit.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2023,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -28,10 +28,14 @@
 #include "tests/test-common.hpp"
 #include "tests/daemon/global-io-fixture.hpp"
 
+#include <ndn-cxx/util/concepts.hpp>
+
 namespace nfd::tests {
 
 using namespace nfd::pit;
 
+NDN_CXX_ASSERT_FORWARD_ITERATOR(Pit::const_iterator);
+
 BOOST_AUTO_TEST_SUITE(Table)
 BOOST_FIXTURE_TEST_SUITE(TestPit, GlobalIoFixture)
 
diff --git a/tests/daemon/table/strategy-choice.t.cpp b/tests/daemon/table/strategy-choice.t.cpp
index b285234..0438954 100644
--- a/tests/daemon/table/strategy-choice.t.cpp
+++ b/tests/daemon/table/strategy-choice.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2023,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -29,8 +29,12 @@
 #include "tests/daemon/global-io-fixture.hpp"
 #include "tests/daemon/fw/dummy-strategy.hpp"
 
+#include <ndn-cxx/util/concepts.hpp>
+
 namespace nfd::tests {
 
+NDN_CXX_ASSERT_FORWARD_ITERATOR(StrategyChoice::const_iterator);
+
 class StrategyChoiceFixture : public GlobalIoFixture
 {
 protected: