|
|
@@ -1536,6 +1536,24 @@ public:
|
|
|
return static_cast<bool>(handle);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @brief Checks if two iterators refer to the same element.
|
|
|
+ * @param other The iterator with which to compare.
|
|
|
+ * @return True if the iterators refer to the same element, false otherwise.
|
|
|
+ */
|
|
|
+ [[nodiscard]] bool operator==(const meta_iterator &other) const ENTT_NOEXCEPT {
|
|
|
+ return handle == other.handle;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @brief Checks if two iterators refer to the same element.
|
|
|
+ * @param other The iterator with which to compare.
|
|
|
+ * @return False if the iterators refer to the same element, true otherwise.
|
|
|
+ */
|
|
|
+ [[nodiscard]] bool operator!=(const meta_iterator &other) const ENTT_NOEXCEPT {
|
|
|
+ return !(*this == other);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @brief Returns the underlying iterator.
|
|
|
* @return The underlying iterator.
|
|
|
@@ -1549,26 +1567,6 @@ private:
|
|
|
any handle{};
|
|
|
};
|
|
|
|
|
|
-/**
|
|
|
- * @brief Checks if two iterators refer to the same element.
|
|
|
- * @param lhs An iterator to compare.
|
|
|
- * @param rhs An iterator with which to compare.
|
|
|
- * @return True if the iterators refer to the same element, false otherwise.
|
|
|
- */
|
|
|
-[[nodiscard]] inline bool operator==(const typename meta_sequence_container::iterator &lhs, const typename meta_sequence_container::iterator &rhs) ENTT_NOEXCEPT {
|
|
|
- return lhs.base() == rhs.base();
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * @brief Checks if two iterators refer to the same element.
|
|
|
- * @param lhs An iterator to compare.
|
|
|
- * @param rhs An iterator with which to compare.
|
|
|
- * @return False if the iterators refer to the same element, true otherwise.
|
|
|
- */
|
|
|
-[[nodiscard]] inline bool operator!=(const typename meta_sequence_container::iterator &lhs, const typename meta_sequence_container::iterator &rhs) ENTT_NOEXCEPT {
|
|
|
- return !(lhs == rhs);
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* @brief Returns the meta value type of a container.
|
|
|
* @return The meta value type of the container.
|
|
|
@@ -1746,11 +1744,21 @@ public:
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @brief Returns the underlying iterator.
|
|
|
- * @return The underlying iterator.
|
|
|
+ * @brief Checks if two iterators refer to the same element.
|
|
|
+ * @param other The iterator with which to compare.
|
|
|
+ * @return True if the iterators refer to the same element, false otherwise.
|
|
|
*/
|
|
|
- any base() const ENTT_NOEXCEPT {
|
|
|
- return handle.as_ref();
|
|
|
+ [[nodiscard]] bool operator==(const meta_iterator &other) const ENTT_NOEXCEPT {
|
|
|
+ return handle == other.handle;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @brief Checks if two iterators refer to the same element.
|
|
|
+ * @param other The iterator with which to compare.
|
|
|
+ * @return False if the iterators refer to the same element, true otherwise.
|
|
|
+ */
|
|
|
+ [[nodiscard]] bool operator!=(const meta_iterator &other) const ENTT_NOEXCEPT {
|
|
|
+ return !(*this == other);
|
|
|
}
|
|
|
|
|
|
private:
|
|
|
@@ -1758,26 +1766,6 @@ private:
|
|
|
any handle{};
|
|
|
};
|
|
|
|
|
|
-/**
|
|
|
- * @brief Checks if two iterators refer to the same element.
|
|
|
- * @param lhs An iterator to compare.
|
|
|
- * @param rhs An iterator with which to compare.
|
|
|
- * @return True if the iterators refer to the same element, false otherwise.
|
|
|
- */
|
|
|
-[[nodiscard]] inline bool operator==(const typename meta_associative_container::iterator &lhs, const typename meta_associative_container::iterator &rhs) ENTT_NOEXCEPT {
|
|
|
- return lhs.base() == rhs.base();
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * @brief Checks if two iterators refer to the same element.
|
|
|
- * @param lhs An iterator to compare.
|
|
|
- * @param rhs An iterator with which to compare.
|
|
|
- * @return False if the iterators refer to the same element, true otherwise.
|
|
|
- */
|
|
|
-[[nodiscard]] inline bool operator!=(const typename meta_associative_container::iterator &lhs, const typename meta_associative_container::iterator &rhs) ENTT_NOEXCEPT {
|
|
|
- return !(lhs == rhs);
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* @brief Returns true if a container is also key-only, false otherwise.
|
|
|
* @return True if the associative container is also key-only, false otherwise.
|