exclude: Provide EqualityComparable concept
Change-Id: Iee9a1738881be159b7944ce618869687f61e61b5
diff --git a/src/exclude.hpp b/src/exclude.hpp
index 9435f41..1475697 100644
--- a/src/exclude.hpp
+++ b/src/exclude.hpp
@@ -137,6 +137,13 @@
void
clear();
+public: // EqualityComparable concept
+ bool
+ operator==(const Exclude& other) const;
+
+ bool
+ operator!=(const Exclude& other) const;
+
public: // low-level exclude element API
typedef std::map< name::Component, bool /*any*/, std::greater<name::Component> > exclude_type;
@@ -222,6 +229,7 @@
Exclude::clear()
{
m_exclude.clear();
+ m_wire.reset();
}
inline size_t
@@ -254,12 +262,10 @@
return m_exclude.rend();
}
-inline std::string
-Exclude::toUri() const
+inline bool
+Exclude::operator!=(const Exclude& other) const
{
- std::ostringstream os;
- os << *this;
- return os.str();
+ return !(*this == other);
}
} // ndn