diff --git a/src/tag/Tag.cxx b/src/tag/Tag.cxx
index 585862c36..4ca50b878 100644
--- a/src/tag/Tag.cxx
+++ b/src/tag/Tag.cxx
@@ -7,6 +7,15 @@
 
 #include <cassert>
 
+bool
+Tag::operator==(const Tag &other) const noexcept {
+	return (this == &other) ? true :
+		duration == other.duration
+		&& has_playlist == other.has_playlist
+		&& num_items == other.num_items
+		&& std::equal(begin(), end(), other.begin(), other.end());
+}
+
 void
 Tag::Clear() noexcept
 {
diff --git a/src/tag/Tag.hxx b/src/tag/Tag.hxx
index 6d6c368af..dbfdb49f1 100644
--- a/src/tag/Tag.hxx
+++ b/src/tag/Tag.hxx
@@ -65,6 +65,8 @@ struct Tag {
 		return *this;
 	}
 
+	bool operator==(const Tag &other) const noexcept;
+
 	/**
 	 * Similar to the move operator, but move only the #TagItem
 	 * array.