diff --git a/daemon/table/fib.hpp b/daemon/table/fib.hpp
index 73e0e21..fc5439f 100644
--- a/daemon/table/fib.hpp
+++ b/daemon/table/fib.hpp
@@ -105,10 +105,10 @@
   typedef boost::transformed_range<name_tree::GetTableEntry<Entry>, const name_tree::Range> Range;
   typedef boost::range_iterator<Range>::type const_iterator;
 
-  /** \brief returns an iterator pointing to the first FIB entry
-   *  \note Iteration order is implementation-specific and is undefined
-   *  \note The returned iterator may get invalidated if FIB or another NameTree-based
-   *        table is modified
+  /** \return an iterator to the beginning
+   *  \note Iteration order is implementation-defined.
+   *  \warning Undefined behavior may occur if a FIB/PIT/Measurements/StrategyChoice entry
+   *           is inserted or erased during enumeration.
    */
   const_iterator
   begin() const
@@ -116,9 +116,8 @@
     return this->getRange().begin();
   }
 
-  /** \brief returns an iterator referring to the past-the-end FIB entry
-   *  \note The returned iterator may get invalidated if FIB or another NameTree-based
-   *        table is modified
+  /** \return an iterator to the end
+   *  \sa begin()
    */
   const_iterator
   end() const
diff --git a/daemon/table/name-tree.hpp b/daemon/table/name-tree.hpp
index 5c31103..c4b8b27 100644
--- a/daemon/table/name-tree.hpp
+++ b/daemon/table/name-tree.hpp
@@ -174,7 +174,7 @@
    *    ...
    *  }
    *  \endcode
-   *  \note Iteration order is implementation-specific and is undefined.
+   *  \note Iteration order is implementation-defined.
    *  \warning If a name tree entry whose name is a prefix of \p name is inserted
    *           during the enumeration, it may or may not be visited.
    *           If a name tree entry whose name is a prefix of \p name is deleted
@@ -197,7 +197,7 @@
    *    ...
    *  }
    *  \endcode
-   *  \note Iteration order is implementation-specific and is undefined.
+   *  \note Iteration order is implementation-defined.
    *  \warning If a name tree entry is inserted or deleted during the enumeration,
    *           it may cause the enumeration to skip entries or visit some entries twice.
    */
@@ -217,7 +217,7 @@
    *    ...
    *  }
    *  \endcode
-   *  \note Iteration order is implementation-specific and is undefined.
+   *  \note Iteration order is implementation-defined.
    *  \warning If a name tree entry under \p prefix is inserted or deleted during the enumeration,
    *           it may cause the enumeration to skip entries or visit some entries twice.
    */
@@ -225,7 +225,7 @@
   partialEnumerate(const Name& prefix,
                    const EntrySubTreeSelector& entrySubTreeSelector = AnyEntrySubTree()) const;
 
-  /** \return an iterator to enumerate all entries
+  /** \return an iterator to the beginning
    *  \sa fullEnumerate
    */
   const_iterator
@@ -234,7 +234,8 @@
     return fullEnumerate().begin();
   }
 
-  /** \return a past-the-end iterator
+  /** \return an iterator to the end
+   *  \sa begin()
    */
   const_iterator
   end() const
diff --git a/daemon/table/pit.hpp b/daemon/table/pit.hpp
index 8e6c9f1..3f49737 100644
--- a/daemon/table/pit.hpp
+++ b/daemon/table/pit.hpp
@@ -101,9 +101,9 @@
   typedef Iterator const_iterator;
 
   /** \return an iterator to the beginning
-   *  \note Iteration order is implementation-specific and is undefined
-   *  \warning Undefine behavior may occur if a FIB/PIT/Measurements/StrategyChoice entry
-   *           is inserted or deleted during PIT enumeration.
+   *  \note Iteration order is implementation-defined.
+   *  \warning Undefined behavior may occur if a FIB/PIT/Measurements/StrategyChoice entry
+   *           is inserted or erased during enumeration.
    */
   const_iterator
   begin() const;
diff --git a/daemon/table/strategy-choice.cpp b/daemon/table/strategy-choice.cpp
index be10945..c3d02e3 100644
--- a/daemon/table/strategy-choice.cpp
+++ b/daemon/table/strategy-choice.cpp
@@ -266,10 +266,12 @@
   }
 }
 
-StrategyChoice::const_iterator
-StrategyChoice::begin() const
+StrategyChoice::Range
+StrategyChoice::getRange() const
 {
-  return const_iterator(m_nameTree.fullEnumerate(&nteHasStrategyChoiceEntry).begin());
+  return m_nameTree.fullEnumerate(&nteHasStrategyChoiceEntry) |
+         boost::adaptors::transformed(name_tree::GetTableEntry<Entry>(
+                                      &name_tree::Entry::getStrategyChoiceEntry));
 }
 
 } // namespace strategy_choice
diff --git a/daemon/table/strategy-choice.hpp b/daemon/table/strategy-choice.hpp
index 75d3a47..1038cfb 100644
--- a/daemon/table/strategy-choice.hpp
+++ b/daemon/table/strategy-choice.hpp
@@ -29,6 +29,8 @@
 #include "strategy-choice-entry.hpp"
 #include "name-tree.hpp"
 
+#include <boost/range/adaptor/transformed.hpp>
+
 namespace nfd {
 namespace strategy_choice {
 
@@ -48,6 +50,12 @@
 public:
   StrategyChoice(NameTree& nameTree, unique_ptr<fw::Strategy> defaultStrategy);
 
+  size_t
+  size() const
+  {
+    return m_nItems;
+  }
+
 public: // available Strategy types
   /** \brief determines if a strategy is installed
    *  \param strategyName name of the strategy
@@ -99,57 +107,42 @@
   findEffectiveStrategy(const Name& prefix) const;
 
   /** \brief get effective strategy for pitEntry
+   *
+   *  This is equivalent to .findEffectiveStrategy(pitEntry.getName())
    */
   fw::Strategy&
   findEffectiveStrategy(const pit::Entry& pitEntry) const;
 
   /** \brief get effective strategy for measurementsEntry
+   *
+   *  This is equivalent to .findEffectiveStrategy(measurementsEntry.getName())
    */
   fw::Strategy&
   findEffectiveStrategy(const measurements::Entry& measurementsEntry) const;
 
 public: // enumeration
-  class const_iterator
-    : public std::iterator<std::forward_iterator_tag, const Entry>
-  {
-  public:
-    explicit
-    const_iterator(const NameTree::const_iterator& it);
+  typedef boost::transformed_range<name_tree::GetTableEntry<Entry>, const name_tree::Range> Range;
+  typedef boost::range_iterator<Range>::type const_iterator;
 
-    ~const_iterator();
-
-    const Entry&
-    operator*() const;
-
-    const Entry*
-    operator->() const;
-
-    const_iterator&
-    operator++();
-
-    const_iterator
-    operator++(int);
-
-    bool
-    operator==(const const_iterator& other) const;
-
-    bool
-    operator!=(const const_iterator& other) const;
-
-  private:
-    NameTree::const_iterator m_nameTreeIterator;
-  };
-
-  /** \return number of entries stored
+  /** \return an iterator to the beginning
+   *  \note Iteration order is implementation-defined.
+   *  \warning Undefined behavior may occur if a FIB/PIT/Measurements/StrategyChoice entry
+   *           is inserted or erased during enumeration.
    */
-  size_t
-  size() const;
-
   const_iterator
-  begin() const;
+  begin() const
+  {
+    return this->getRange().begin();
+  }
 
+  /** \return an iterator to the end
+   *  \sa begin()
+   */
   const_iterator
-  end() const;
+  end() const
+  {
+    return this->getRange().end();
+  }
 
 private:
   /** \brief get Strategy instance by strategyName
@@ -172,6 +165,9 @@
   fw::Strategy&
   findEffectiveStrategyImpl(const K& key) const;
 
+  Range
+  getRange() const;
+
 private:
   NameTree& m_nameTree;
   size_t m_nItems;
@@ -180,69 +176,6 @@
   StrategyInstanceTable m_strategyInstances;
 };
 
-inline size_t
-StrategyChoice::size() const
-{
-  return m_nItems;
-}
-
-inline StrategyChoice::const_iterator
-StrategyChoice::end() const
-{
-  return const_iterator(m_nameTree.end());
-}
-
-inline
-StrategyChoice::const_iterator::const_iterator(const NameTree::const_iterator& it)
-  : m_nameTreeIterator(it)
-{
-}
-
-inline
-StrategyChoice::const_iterator::~const_iterator()
-{
-}
-
-inline
-StrategyChoice::const_iterator
-StrategyChoice::const_iterator::operator++(int)
-{
-  StrategyChoice::const_iterator temp(*this);
-  ++(*this);
-  return temp;
-}
-
-inline StrategyChoice::const_iterator&
-StrategyChoice::const_iterator::operator++()
-{
-  ++m_nameTreeIterator;
-  return *this;
-}
-
-inline const Entry&
-StrategyChoice::const_iterator::operator*() const
-{
-  return *(m_nameTreeIterator->getStrategyChoiceEntry());
-}
-
-inline const Entry*
-StrategyChoice::const_iterator::operator->() const
-{
-  return m_nameTreeIterator->getStrategyChoiceEntry();
-}
-
-inline bool
-StrategyChoice::const_iterator::operator==(const StrategyChoice::const_iterator& other) const
-{
-  return m_nameTreeIterator == other.m_nameTreeIterator;
-}
-
-inline bool
-StrategyChoice::const_iterator::operator!=(const StrategyChoice::const_iterator& other) const
-{
-  return m_nameTreeIterator != other.m_nameTreeIterator;
-}
-
 } // namespace strategy_choice
 
 using strategy_choice::StrategyChoice;
