diff --git a/src/entt/core/iterator.hpp b/src/entt/core/iterator.hpp index 7db2d9a7d..d637edd21 100644 --- a/src/entt/core/iterator.hpp +++ b/src/entt/core/iterator.hpp @@ -104,22 +104,19 @@ public: return current; } + /** + * @brief Comparison operator. + * @param other A properly initialized iota iterator. + * @return True if the two iterators are identical, false otherwise. + */ + [[nodiscard]] constexpr bool operator==(const iota_iterator &other) const noexcept { + return current == other.current; + } + private: value_type current; }; -/** - * @brief Comparison operator. - * @tparam Type Value type of the iota iterator. - * @param lhs A properly initialized iota iterator. - * @param rhs A properly initialized iota iterator. - * @return True if the two iterators are identical, false otherwise. - */ -template -[[nodiscard]] constexpr bool operator==(const iota_iterator &lhs, const iota_iterator &rhs) noexcept { - return *lhs == *rhs; -} - /** * @brief Utility class to create an iterable object from a pair of iterators. * @tparam It Type of iterator.