diff --git a/src/exclude.cpp b/src/exclude.cpp
index 19091f4..7007daf 100644
--- a/src/exclude.cpp
+++ b/src/exclude.cpp
@@ -41,12 +41,53 @@
 }
 
 bool
+operator==(const Exclude::ExcludeComponent& a, const Exclude::ExcludeComponent& b)
+{
+  return (a.isNegInf && b.isNegInf) ||
+         (a.isNegInf == b.isNegInf && a.component == b.component);
+}
+
+bool
 operator>(const Exclude::ExcludeComponent& a, const Exclude::ExcludeComponent& b)
 {
   return a.isNegInf < b.isNegInf ||
          (a.isNegInf == b.isNegInf && a.component > b.component);
 }
 
+bool
+Exclude::Range::operator==(const Exclude::Range& other) const
+{
+  return this->fromInfinity == other.fromInfinity && this->toInfinity == other.toInfinity &&
+         (this->fromInfinity || this->from == other.from) &&
+         (this->toInfinity || this->to == other.to);
+}
+
+std::ostream&
+operator<<(std::ostream& os, const Exclude::Range& range)
+{
+  if (range.isSingular()) {
+    return os << '{' << range.from << '}';
+  }
+
+  if (range.fromInfinity) {
+    os << "(-∞";
+  }
+  else {
+    os << '[' << range.from;
+  }
+
+  os << ",";
+
+  if (range.toInfinity) {
+    os << "+∞)";
+  }
+  else {
+    os << range.to << ']';
+  }
+
+  return os;
+}
+
 BOOST_CONCEPT_ASSERT((boost::EqualityComparable<Exclude>));
 BOOST_CONCEPT_ASSERT((WireEncodable<Exclude>));
 BOOST_CONCEPT_ASSERT((WireEncodableWithEncodingBuffer<Exclude>));
@@ -175,8 +216,8 @@
 bool
 Exclude::isExcluded(const name::Component& comp) const
 {
-  const_iterator lb = m_entries.lower_bound(comp);
-  return lb != end() && // lb==end() means comp is less than the first excluded component
+  ExcludeMap::const_iterator lb = m_entries.lower_bound(comp);
+  return lb != m_entries.end() && // if false, comp is less than the first excluded component
          (lb->second || // comp matches an ANY range
           (!lb->first.isNegInf && lb->first.component == comp)); // comp equals an exact excluded component
 }
@@ -223,8 +264,8 @@
                                 "(for single name exclude use Exclude::excludeOne)"));
   }
 
-  iterator newFrom = m_entries.lower_bound(from);
-  if (newFrom == end() || !newFrom->second /*without ANY*/) {
+  ExcludeMap::iterator newFrom = m_entries.lower_bound(from);
+  if (newFrom == m_entries.end() || !newFrom->second /*without ANY*/) {
     bool isNewEntry = false;
     std::tie(newFrom, isNewEntry) = m_entries.emplace(from, true);
     if (!isNewEntry) {
@@ -235,8 +276,8 @@
   // else
   // nothing special if start of the range already exists with ANY flag set
 
-  iterator newTo = m_entries.lower_bound(to);
-  BOOST_ASSERT(newTo != end());
+  ExcludeMap::iterator newTo = m_entries.lower_bound(to);
+  BOOST_ASSERT(newTo != m_entries.end());
   if (newTo == newFrom || !newTo->second) {
     newTo = m_entries.emplace_hint(newTo, to, false);
     ++newTo;
@@ -254,8 +295,8 @@
 Exclude&
 Exclude::excludeAfter(const name::Component& from)
 {
-  iterator newFrom = m_entries.lower_bound(from);
-  if (newFrom == end() || !newFrom->second /*without ANY*/) {
+  ExcludeMap::iterator newFrom = m_entries.lower_bound(from);
+  if (newFrom == m_entries.end() || !newFrom->second /*without ANY*/) {
     bool isNewEntry = false;
     std::tie(newFrom, isNewEntry) = m_entries.emplace(from, true);
     if (!isNewEntry) {
@@ -273,18 +314,11 @@
   return *this;
 }
 
-void
-Exclude::clear()
-{
-  m_entries.clear();
-  m_wire.reset();
-}
-
 std::ostream&
 operator<<(std::ostream& os, const Exclude& exclude)
 {
   bool isFirst = true;
-  for (const Exclude::Entry& entry : exclude | boost::adaptors::reversed) {
+  for (const Exclude::Entry& entry : exclude.m_entries | boost::adaptors::reversed) {
     if (!entry.first.isNegInf) {
       if (!isFirst)
         os << ",";
@@ -312,12 +346,81 @@
 bool
 Exclude::operator==(const Exclude& other) const
 {
-  if (empty() && other.empty())
-    return true;
-  if (empty() || other.empty())
-    return false;
+  return m_entries == other.m_entries;
+}
 
-  return wireEncode() == other.wireEncode();
+size_t
+Exclude::size() const
+{
+  return std::distance(begin(), end());
+}
+
+void
+Exclude::clear()
+{
+  m_entries.clear();
+  m_wire.reset();
+}
+
+Exclude::const_iterator::const_iterator(ExcludeMap::const_reverse_iterator it,
+                                        ExcludeMap::const_reverse_iterator rend)
+  : m_it(it)
+  , m_rend(rend)
+{
+  this->update();
+}
+
+Exclude::const_iterator&
+Exclude::const_iterator::operator++()
+{
+  bool wasInRange = m_it->second;
+  ++m_it;
+  if (wasInRange && m_it != m_rend) {
+    BOOST_ASSERT(m_it->second == false); // consecutive ranges should have been combined
+    ++m_it; // skip over range high limit
+  }
+  this->update();
+  return *this;
+}
+
+Exclude::const_iterator
+Exclude::const_iterator::operator++(int)
+{
+  const_iterator i = *this;
+  this->operator++();
+  return i;
+}
+
+void
+Exclude::const_iterator::update()
+{
+  if (m_it == m_rend) {
+    return;
+  }
+
+  if (m_it->second) { // range
+    if (m_it->first.isNegInf) {
+      m_range.fromInfinity = true;
+    }
+    else {
+      m_range.fromInfinity = false;
+      m_range.from = m_it->first.component;
+    }
+
+    auto next = std::next(m_it);
+    if (next == m_rend) {
+      m_range.toInfinity = true;
+    }
+    else {
+      m_range.toInfinity = false;
+      m_range.to = next->first.component;
+    }
+  }
+  else { // single
+    BOOST_ASSERT(!m_it->first.isNegInf);
+    m_range.fromInfinity = m_range.toInfinity = false;
+    m_range.from = m_range.to = m_it->first.component;
+  }
 }
 
 } // namespace ndn
diff --git a/src/exclude.hpp b/src/exclude.hpp
index e850cf7..595f143 100644
--- a/src/exclude.hpp
+++ b/src/exclude.hpp
@@ -126,18 +126,6 @@
   Exclude&
   excludeAfter(const name::Component& from);
 
-  /**
-   * @brief Check if exclude filter is empty
-   */
-  bool
-  empty() const;
-
-  /**
-   * @brief Clear the exclude filter
-   */
-  void
-  clear();
-
 public: // EqualityComparable concept
   bool
   operator==(const Exclude& other) const;
@@ -145,7 +133,7 @@
   bool
   operator!=(const Exclude& other) const;
 
-public: // low-level exclude entry API
+public: // interal storage
   /**
    * @brief either a name::Component or "negative infinity"
    */
@@ -179,31 +167,106 @@
    *
    * The map is ordered in descending order to simplify \p isExcluded.
    */
-  typedef std::map<ExcludeComponent, bool, std::greater<ExcludeComponent>> ExcludeType;
-  typedef ExcludeType::value_type Entry;
-  typedef ExcludeType::iterator iterator;
-  typedef ExcludeType::const_iterator const_iterator;
-  typedef ExcludeType::reverse_iterator reverse_iterator;
-  typedef ExcludeType::const_reverse_iterator const_reverse_iterator;
+  typedef std::map<ExcludeComponent, bool, std::greater<ExcludeComponent>> ExcludeMap;
+  typedef ExcludeMap::value_type Entry;
 
+public: // enumeration API
   /**
-   * @brief Get number of exclude terms
+   * @brief represent an excluded component or range
    */
-  size_t
-  size() const;
+  class Range
+  {
+  public:
+    /**
+     * @retval true A single component is excluded
+     * @retval false A range of more than one components are excluded
+     */
+    bool
+    isSingular() const;
 
-  /**
-   * @brief Get begin iterator of the exclude terms
-   */
+    bool
+    operator==(const Exclude::Range& other) const;
+
+    bool
+    operator!=(const Exclude::Range& other) const;
+
+  public:
+    /**
+     * @brief from negative infinity?
+     */
+    bool fromInfinity;
+
+    /**
+     * @brief from component (inclusive)
+     * @pre valid only if !fromInfinity
+     */
+    name::Component from;
+
+    /**
+     * @brief to positive infinity?
+     */
+    bool toInfinity;
+
+    /**
+     * @brief to component (inclusive)
+     * @pre valid only if !toInfinity
+     */
+    name::Component to;
+  };
+
+  class const_iterator : public std::iterator<std::forward_iterator_tag, const Range>
+  {
+  public:
+    const_iterator() = default;
+
+    const_iterator(ExcludeMap::const_reverse_iterator it, ExcludeMap::const_reverse_iterator rend);
+
+    const Range&
+    operator*() const;
+
+    const Range*
+    operator->() const;
+
+    const_iterator&
+    operator++();
+
+    const_iterator
+    operator++(int);
+
+    bool
+    operator==(const const_iterator& other) const;
+
+    bool
+    operator!=(const const_iterator& other) const;
+
+  private:
+    void
+    update();
+
+  private:
+    ExcludeMap::const_reverse_iterator m_it;
+    ExcludeMap::const_reverse_iterator m_rend;
+    Range m_range;
+    friend class Exclude;
+  };
+
   const_iterator
   begin() const;
 
-  /**
-   * @brief Get end iterator of the exclude terms
-   */
   const_iterator
   end() const;
 
+  bool
+  empty() const;
+
+  size_t
+  size() const;
+
+  /// \todo const_iterator erase(const_iterator i);
+
+  void
+  clear();
+
 private:
   /**
    * @brief directly append exclude element
@@ -219,47 +282,87 @@
   excludeRange(const ExcludeComponent& from, const name::Component& to);
 
 private:
-  ExcludeType m_entries;
-
+  ExcludeMap m_entries;
   mutable Block m_wire;
+
+  friend std::ostream&
+  operator<<(std::ostream& os, const Exclude& name);
 };
 
 std::ostream&
 operator<<(std::ostream& os, const Exclude& name);
 
 bool
+operator==(const Exclude::ExcludeComponent& a, const Exclude::ExcludeComponent& b);
+
+bool
 operator>(const Exclude::ExcludeComponent& a, const Exclude::ExcludeComponent& b);
 
+std::ostream&
+operator<<(std::ostream& os, const Exclude::Range& range);
+
+inline Exclude::const_iterator
+Exclude::begin() const
+{
+  return const_iterator(m_entries.rbegin(), m_entries.rend());
+}
+
+inline Exclude::const_iterator
+Exclude::end() const
+{
+  return const_iterator(m_entries.rend(), m_entries.rend());
+}
+
 inline bool
 Exclude::empty() const
 {
   return m_entries.empty();
 }
 
-inline size_t
-Exclude::size() const
-{
-  return m_entries.size();
-}
-
-inline Exclude::const_iterator
-Exclude::begin() const
-{
-  return m_entries.begin();
-}
-
-inline Exclude::const_iterator
-Exclude::end() const
-{
-  return m_entries.end();
-}
-
 inline bool
 Exclude::operator!=(const Exclude& other) const
 {
   return !(*this == other);
 }
 
+inline bool
+Exclude::Range::isSingular() const
+{
+  return !this->fromInfinity && !this->toInfinity && this->from == this->to;
+}
+
+inline bool
+Exclude::Range::operator!=(const Exclude::Range& other) const
+{
+  return !this->operator==(other);
+}
+
+inline const Exclude::Range&
+Exclude::const_iterator::operator*() const
+{
+  BOOST_ASSERT(m_it != m_rend);
+  return m_range;
+}
+
+inline const Exclude::Range*
+Exclude::const_iterator::operator->() const
+{
+  BOOST_ASSERT(m_it != m_rend);
+  return &m_range;
+}
+
+inline bool
+Exclude::const_iterator::operator==(const const_iterator& other) const
+{
+  return m_it == other.m_it;
+}
+
+inline bool
+Exclude::const_iterator::operator!=(const const_iterator& other) const
+{
+  return !this->operator==(other);
+}
+
 } // namespace ndn
 
 #endif // NDN_EXCLUDE_H
diff --git a/tests/unit-tests/exclude.t.cpp b/tests/unit-tests/exclude.t.cpp
index 843fadd..46cefa0 100644
--- a/tests/unit-tests/exclude.t.cpp
+++ b/tests/unit-tests/exclude.t.cpp
@@ -21,6 +21,7 @@
 
 #include "exclude.hpp"
 #include "util/crypto.hpp"
+#include <boost/lexical_cast.hpp>
 
 #include "boost-test.hpp"
 
@@ -34,29 +35,52 @@
 BOOST_AUTO_TEST_CASE(One)
 {
   Exclude e;
+  std::vector<Exclude::Range> enumerated;
+
   e.excludeOne(name::Component("b"));
-  BOOST_CHECK_EQUAL(e.size(), 1);
   BOOST_CHECK_EQUAL(e.toUri(), "b");
+  BOOST_CHECK_EQUAL(e.size(), 1);
+  enumerated.clear();
+  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
+  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
+  BOOST_CHECK_EQUAL(enumerated[0].isSingular(), true);
+  BOOST_CHECK_EQUAL(enumerated[0].from, name::Component("b"));
 
   e.excludeOne(name::Component("d"));
-  BOOST_CHECK_EQUAL(e.size(), 2);
   BOOST_CHECK_EQUAL(e.toUri(), "b,d");
+  BOOST_CHECK_EQUAL(e.size(), 2);
+  enumerated.clear();
+  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
+  BOOST_REQUIRE_EQUAL(enumerated.size(), 2);
+  BOOST_CHECK_EQUAL(enumerated[0].isSingular(), true);
+  BOOST_CHECK_EQUAL(enumerated[0].from, name::Component("b"));
+  BOOST_CHECK_EQUAL(enumerated[1].isSingular(), true);
+  BOOST_CHECK_EQUAL(enumerated[1].from, name::Component("d"));
 
   e.excludeOne(name::Component("a"));
-  BOOST_CHECK_EQUAL(e.size(), 3);
   BOOST_CHECK_EQUAL(e.toUri(), "a,b,d");
+  BOOST_CHECK_EQUAL(e.size(), 3);
+  enumerated.clear();
+  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
+  BOOST_REQUIRE_EQUAL(enumerated.size(), 3);
+  BOOST_CHECK_EQUAL(enumerated[0].isSingular(), true);
+  BOOST_CHECK_EQUAL(enumerated[0].from, name::Component("a"));
+  BOOST_CHECK_EQUAL(enumerated[1].isSingular(), true);
+  BOOST_CHECK_EQUAL(enumerated[1].from, name::Component("b"));
+  BOOST_CHECK_EQUAL(enumerated[2].isSingular(), true);
+  BOOST_CHECK_EQUAL(enumerated[2].from, name::Component("d"));
 
   e.excludeOne(name::Component("aa"));
-  BOOST_CHECK_EQUAL(e.size(), 4);
   BOOST_CHECK_EQUAL(e.toUri(), "a,b,d,aa");
+  BOOST_CHECK_EQUAL(e.size(), 4);
 
   e.excludeOne(name::Component("cc"));
-  BOOST_CHECK_EQUAL(e.size(), 5);
   BOOST_CHECK_EQUAL(e.toUri(), "a,b,d,aa,cc");
+  BOOST_CHECK_EQUAL(e.size(), 5);
 
   e.excludeOne(name::Component("c"));
-  BOOST_CHECK_EQUAL(e.size(), 6);
   BOOST_CHECK_EQUAL(e.toUri(), "a,b,c,d,aa,cc");
+  BOOST_CHECK_EQUAL(e.size(), 6);
 }
 
 BOOST_AUTO_TEST_CASE(Before)
@@ -73,49 +97,136 @@
   // example: ANY /b /d ANY /f
 
   Exclude e;
+  std::vector<Exclude::Range> enumerated;
+
   e.excludeOne(name::Component("b0"));
-  BOOST_CHECK_EQUAL(e.size(), 1);
   BOOST_CHECK_EQUAL(e.toUri(), "b0");
+  BOOST_CHECK_EQUAL(e.size(), 1);
+  enumerated.clear();
+  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
+  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
+  BOOST_CHECK_EQUAL(enumerated[0].isSingular(), true);
+  BOOST_CHECK_EQUAL(enumerated[0].from, name::Component("b0"));
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(enumerated[0]), "{b0}");
+  BOOST_CHECK_EQUAL(enumerated[0], (Exclude::Range{false, name::Component("b0"), false, name::Component("b0")}));
+  BOOST_CHECK_NE(enumerated[0], (Exclude::Range{false, name::Component("b0"), false, name::Component("b1")}));
 
   e.excludeBefore(name::Component("b1"));
-  BOOST_CHECK_EQUAL(e.size(), 2);
   BOOST_CHECK_EQUAL(e.toUri(), "*,b1");
+  BOOST_CHECK_EQUAL(e.size(), 1);
+  enumerated.clear();
+  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
+  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
+  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
+  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
+  BOOST_CHECK_EQUAL(enumerated[0].to, name::Component("b1"));
 
   e.excludeBefore(name::Component("c0"));
-  BOOST_CHECK_EQUAL(e.size(), 2);
   BOOST_CHECK_EQUAL(e.toUri(), "*,c0");
+  BOOST_CHECK_EQUAL(e.size(), 1);
+  enumerated.clear();
+  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
+  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
+  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
+  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
+  BOOST_CHECK_EQUAL(enumerated[0].to, name::Component("c0"));
 
   e.excludeRange(name::Component("a0"), name::Component("c0"));
-  BOOST_CHECK_EQUAL(e.size(), 2);
   BOOST_CHECK_EQUAL(e.toUri(), "*,c0");
+  BOOST_CHECK_EQUAL(e.size(), 1);
+  enumerated.clear();
+  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
+  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
+  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
+  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
+  BOOST_CHECK_EQUAL(enumerated[0].to, name::Component("c0"));
 
   e.excludeRange(name::Component("d0"), name::Component("e0"));
-  BOOST_CHECK_EQUAL(e.size(), 4);
   BOOST_CHECK_EQUAL(e.toUri(), "*,c0,d0,*,e0");
+  BOOST_CHECK_EQUAL(e.size(), 2);
+  enumerated.clear();
+  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
+  BOOST_REQUIRE_EQUAL(enumerated.size(), 2);
+  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
+  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
+  BOOST_CHECK_EQUAL(enumerated[0].to, name::Component("c0"));
+  BOOST_CHECK_EQUAL(enumerated[1].fromInfinity, false);
+  BOOST_CHECK_EQUAL(enumerated[1].from, name::Component("d0"));
+  BOOST_CHECK_EQUAL(enumerated[1].toInfinity, false);
+  BOOST_CHECK_EQUAL(enumerated[1].to, name::Component("e0"));
 
   e.excludeRange(name::Component("c1"), name::Component("d1"));
-  BOOST_CHECK_EQUAL(e.size(), 4);
   BOOST_CHECK_EQUAL(e.toUri(), "*,c0,c1,*,e0");
+  BOOST_CHECK_EQUAL(e.size(), 2);
+  enumerated.clear();
+  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
+  BOOST_REQUIRE_EQUAL(enumerated.size(), 2);
+  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
+  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
+  BOOST_CHECK_EQUAL(enumerated[0].to, name::Component("c0"));
+  BOOST_CHECK_EQUAL(enumerated[1].fromInfinity, false);
+  BOOST_CHECK_EQUAL(enumerated[1].from, name::Component("c1"));
+  BOOST_CHECK_EQUAL(enumerated[1].toInfinity, false);
+  BOOST_CHECK_EQUAL(enumerated[1].to, name::Component("e0"));
 
   e.excludeRange(name::Component("a1"), name::Component("d1"));
-  BOOST_CHECK_EQUAL(e.size(), 2);
   BOOST_CHECK_EQUAL(e.toUri(), "*,e0");
+  BOOST_CHECK_EQUAL(e.size(), 1);
+  enumerated.clear();
+  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
+  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
+  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
+  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
+  BOOST_CHECK_EQUAL(enumerated[0].to, name::Component("e0"));
 
   e.excludeBefore(name::Component("e2"));
-  BOOST_CHECK_EQUAL(e.size(), 2);
   BOOST_CHECK_EQUAL(e.toUri(), "*,e2");
+  BOOST_CHECK_EQUAL(e.size(), 1);
+  enumerated.clear();
+  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
+  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
+  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
+  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
+  BOOST_CHECK_EQUAL(enumerated[0].to, name::Component("e2"));
 
   e.excludeAfter(name::Component("f0"));
-  BOOST_CHECK_EQUAL(e.size(), 3);
   BOOST_CHECK_EQUAL(e.toUri(), "*,e2,f0,*");
+  BOOST_CHECK_EQUAL(e.size(), 2);
+  enumerated.clear();
+  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
+  BOOST_REQUIRE_EQUAL(enumerated.size(), 2);
+  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
+  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
+  BOOST_CHECK_EQUAL(enumerated[0].to, name::Component("e2"));
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(enumerated[0]), "(-∞,e2]");
+  BOOST_CHECK_EQUAL(enumerated[0], (Exclude::Range{true, name::Component("ignore"), false, name::Component("e2")}));
+  BOOST_CHECK_EQUAL(enumerated[1].fromInfinity, false);
+  BOOST_CHECK_EQUAL(enumerated[1].from, name::Component("f0"));
+  BOOST_CHECK_EQUAL(enumerated[1].toInfinity, true);
+  BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(enumerated[1]), "[f0,+∞)");
+  BOOST_CHECK_EQUAL(enumerated[1], (Exclude::Range{false, name::Component("f0"), true, name::Component("ignore")}));
 
   e.excludeAfter(name::Component("e5"));
-  BOOST_CHECK_EQUAL(e.size(), 3);
   BOOST_CHECK_EQUAL(e.toUri(), "*,e2,e5,*");
+  BOOST_CHECK_EQUAL(e.size(), 2);
+  enumerated.clear();
+  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
+  BOOST_REQUIRE_EQUAL(enumerated.size(), 2);
+  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
+  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
+  BOOST_CHECK_EQUAL(enumerated[0].to, name::Component("e2"));
+  BOOST_CHECK_EQUAL(enumerated[1].fromInfinity, false);
+  BOOST_CHECK_EQUAL(enumerated[1].from, name::Component("e5"));
+  BOOST_CHECK_EQUAL(enumerated[1].toInfinity, true);
 
   e.excludeAfter(name::Component("b2"));
-  BOOST_CHECK_EQUAL(e.size(), 1);
   BOOST_CHECK_EQUAL(e.toUri(), "*");
+  BOOST_CHECK_EQUAL(e.size(), 1);
+  enumerated.clear();
+  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
+  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
+  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
+  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, true);
 
   BOOST_REQUIRE_THROW(e.excludeRange(name::Component("d0"), name::Component("a0")),
                       Exclude::Error);
@@ -179,6 +290,14 @@
   BOOST_CHECK_EQUAL(e.isExcluded(digestBC), false);
   BOOST_CHECK_EQUAL(e.isExcluded(name::Component("")), false);
   BOOST_CHECK_EQUAL(e.isExcluded(name::Component("generic")), false);
+
+  BOOST_CHECK_EQUAL(e.size(), 1);
+  std::vector<Exclude::Range> enumerated;
+  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
+  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
+  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, true);
+  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
+  BOOST_CHECK_EQUAL(enumerated[0].to, digestBB);
 }
 
 BOOST_AUTO_TEST_CASE(BeforeGeneric)
@@ -209,6 +328,14 @@
   BOOST_CHECK_EQUAL(e.isExcluded(digestBC), true);
   BOOST_CHECK_EQUAL(e.isExcluded(name::Component("")), true);
   BOOST_CHECK_EQUAL(e.isExcluded(name::Component("generic")), true);
+
+  BOOST_CHECK_EQUAL(e.size(), 1);
+  std::vector<Exclude::Range> enumerated;
+  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
+  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
+  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, false);
+  BOOST_CHECK_EQUAL(enumerated[0].from, digestBB);
+  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, true);
 }
 
 BOOST_AUTO_TEST_CASE(AfterDigestFF)
@@ -286,6 +413,15 @@
   BOOST_CHECK_EQUAL(e.isExcluded(digestF), true);
   BOOST_CHECK_EQUAL(e.isExcluded(name::Component("")), true);
   BOOST_CHECK_EQUAL(e.isExcluded(name::Component("generic")), false);
+
+  BOOST_CHECK_EQUAL(e.size(), 1);
+  std::vector<Exclude::Range> enumerated;
+  std::copy(e.begin(), e.end(), std::back_inserter(enumerated));
+  BOOST_REQUIRE_EQUAL(enumerated.size(), 1);
+  BOOST_CHECK_EQUAL(enumerated[0].fromInfinity, false);
+  BOOST_CHECK_EQUAL(enumerated[0].from, digest9);
+  BOOST_CHECK_EQUAL(enumerated[0].toInfinity, false);
+  BOOST_CHECK_EQUAL(enumerated[0].to, name::Component(""));
 }
 
 BOOST_AUTO_TEST_CASE(RangeGenericDigest)
@@ -427,6 +563,7 @@
 
 BOOST_AUTO_TEST_SUITE_END() // WireCompare
 
+
 BOOST_AUTO_TEST_SUITE_END()
 
 } // namespace tests
