skypjack 1 день назад
Родитель
Сommit
3bffa25af2

+ 4 - 4
src/entt/container/dense_map.hpp

@@ -68,7 +68,7 @@ public:
     using value_type = stl::pair<first_type, second_type>;
     using pointer = input_iterator_pointer<value_type>;
     using reference = value_type;
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     using iterator_category = stl::input_iterator_tag;
     using iterator_concept = stl::random_access_iterator_tag;
 
@@ -132,7 +132,7 @@ public:
     }
 
     template<typename Other>
-    [[nodiscard]] constexpr std::ptrdiff_t operator-(const dense_map_iterator<Other> &other) const noexcept {
+    [[nodiscard]] constexpr stl::ptrdiff_t operator-(const dense_map_iterator<Other> &other) const noexcept {
         return it - other.it;
     }
 
@@ -163,7 +163,7 @@ public:
     using value_type = stl::pair<first_type, second_type>;
     using pointer = input_iterator_pointer<value_type>;
     using reference = value_type;
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     using iterator_category = stl::input_iterator_tag;
     using iterator_concept = stl::forward_iterator_tag;
 
@@ -324,7 +324,7 @@ public:
     /*! @brief Unsigned integer type. */
     using size_type = stl::size_t;
     /*! @brief Signed integer type. */
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     /*! @brief Type of function to use to hash the keys. */
     using hasher = Hash;
     /*! @brief Type of function to use to compare the keys for equality. */

+ 4 - 4
src/entt/container/dense_set.hpp

@@ -38,7 +38,7 @@ public:
     using value_type = stl::remove_const_t<stl::remove_pointer_t<It>>::second_type;
     using pointer = const value_type *;
     using reference = const value_type &;
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     using iterator_category = stl::random_access_iterator_tag;
 
     constexpr dense_set_iterator() noexcept
@@ -101,7 +101,7 @@ public:
     }
 
     template<typename Other>
-    [[nodiscard]] constexpr std::ptrdiff_t operator-(const dense_set_iterator<Other> &other) const noexcept {
+    [[nodiscard]] constexpr stl::ptrdiff_t operator-(const dense_set_iterator<Other> &other) const noexcept {
         return it - other.it;
     }
 
@@ -130,7 +130,7 @@ public:
     using value_type = stl::remove_const_t<stl::remove_pointer_t<It>>::second_type;
     using pointer = const value_type *;
     using reference = const value_type &;
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     using iterator_category = stl::forward_iterator_tag;
 
     constexpr dense_set_local_iterator() noexcept = default;
@@ -269,7 +269,7 @@ public:
     /*! @brief Unsigned integer type. */
     using size_type = stl::size_t;
     /*! @brief Signed integer type. */
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     /*! @brief Type of function to use to hash the elements. */
     using hasher = Hash;
     /*! @brief Type of function to use to compare the elements for equality. */

+ 3 - 3
src/entt/container/table.hpp

@@ -24,7 +24,7 @@ public:
     using value_type = decltype(stl::forward_as_tuple(*stl::declval<It>()...));
     using pointer = input_iterator_pointer<value_type>;
     using reference = value_type;
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     using iterator_category = stl::input_iterator_tag;
     using iterator_concept = stl::random_access_iterator_tag;
 
@@ -87,7 +87,7 @@ public:
     }
 
     template<typename... Other>
-    [[nodiscard]] constexpr std::ptrdiff_t operator-(const table_iterator<Other...> &other) const noexcept {
+    [[nodiscard]] constexpr stl::ptrdiff_t operator-(const table_iterator<Other...> &other) const noexcept {
         return std::get<0>(it) - std::get<0>(other.it);
     }
 
@@ -125,7 +125,7 @@ public:
     /*! @brief Unsigned integer type. */
     using size_type = stl::size_t;
     /*! @brief Signed integer type. */
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     /*! @brief Input iterator type. */
     using iterator = internal::table_iterator<typename Container::iterator...>;
     /*! @brief Constant input iterator type. */

+ 2 - 1
src/entt/core/iterator.hpp

@@ -3,6 +3,7 @@
 
 #include <concepts>
 #include <memory>
+#include "../stl/cstddef.hpp"
 #include "../stl/iterator.hpp"
 #include "../stl/type_traits.hpp"
 #include "../stl/utility.hpp"
@@ -62,7 +63,7 @@ struct iota_iterator final {
     /*! @brief Non-reference type, same as value type. */
     using reference = value_type;
     /*! @brief Difference type. */
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     /*! @brief Iterator category. */
     using iterator_category = stl::input_iterator_tag;
 

+ 3 - 3
src/entt/entity/group.hpp

@@ -41,7 +41,7 @@ public:
     using value_type = decltype(stl::tuple_cat(stl::make_tuple(*stl::declval<It>()), stl::declval<Owned>().get_as_tuple({})..., stl::declval<Get>().get_as_tuple({})...));
     using pointer = input_iterator_pointer<value_type>;
     using reference = value_type;
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     using iterator_category = stl::input_iterator_tag;
     using iterator_concept = stl::forward_iterator_tag;
 
@@ -291,7 +291,7 @@ public:
     /*! @brief Unsigned integer type. */
     using size_type = stl::size_t;
     /*! @brief Signed integer type. */
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     /*! @brief Common type among all storage types. */
     using common_type = base_type;
     /*! @brief Random access iterator type. */
@@ -705,7 +705,7 @@ public:
     /*! @brief Unsigned integer type. */
     using size_type = stl::size_t;
     /*! @brief Signed integer type. */
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     /*! @brief Common type among all storage types. */
     using common_type = base_type;
     /*! @brief Random access iterator type. */

+ 1 - 1
src/entt/entity/handle.hpp

@@ -28,7 +28,7 @@ public:
     using value_type = stl::iterator_traits<It>::value_type;
     using pointer = input_iterator_pointer<value_type>;
     using reference = value_type;
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     using iterator_category = stl::input_iterator_tag;
     using iterator_concept = stl::forward_iterator_tag;
 

+ 2 - 2
src/entt/entity/registry.hpp

@@ -47,7 +47,7 @@ public:
     using value_type = stl::pair<id_type, constness_as_t<typename mapped_type::element_type, mapped_type> &>;
     using pointer = input_iterator_pointer<value_type>;
     using reference = value_type;
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     using iterator_category = stl::input_iterator_tag;
     using iterator_concept = stl::random_access_iterator_tag;
 
@@ -111,7 +111,7 @@ public:
     }
 
     template<typename Other>
-    [[nodiscard]] constexpr std::ptrdiff_t operator-(const registry_storage_iterator<Other> &other) const noexcept {
+    [[nodiscard]] constexpr stl::ptrdiff_t operator-(const registry_storage_iterator<Other> &other) const noexcept {
         return it - other.it;
     }
 

+ 1 - 1
src/entt/entity/runtime_view.hpp

@@ -135,7 +135,7 @@ public:
     /*! @brief Unsigned integer type. */
     using size_type = stl::size_t;
     /*! @brief Signed integer type. */
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     /*! @brief Common type among all storage types. */
     using common_type = Type;
     /*! @brief Bidirectional iterator type. */

+ 2 - 2
src/entt/entity/sparse_set.hpp

@@ -86,7 +86,7 @@ struct sparse_set_iterator final {
         return operator[](0);
     }
 
-    [[nodiscard]] constexpr std::ptrdiff_t operator-(const sparse_set_iterator &other) const noexcept {
+    [[nodiscard]] constexpr stl::ptrdiff_t operator-(const sparse_set_iterator &other) const noexcept {
         // intentionally reversed due to backward iteration
         return other.offset - offset;
     }
@@ -363,7 +363,7 @@ public:
     /*! @brief Unsigned integer type. */
     using size_type = stl::size_t;
     /*! @brief Signed integer type. */
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     /*! @brief Pointer type to contained entities. */
     using pointer = packed_container_type::const_pointer;
     /*! @brief Random access iterator type. */

+ 5 - 5
src/entt/entity/storage.hpp

@@ -107,7 +107,7 @@ public:
     }
 
     template<typename Other, auto Arg>
-    [[nodiscard]] constexpr std::ptrdiff_t operator-(const storage_iterator<Other, Arg> &other) const noexcept {
+    [[nodiscard]] constexpr stl::ptrdiff_t operator-(const storage_iterator<Other, Arg> &other) const noexcept {
         // intentionally reversed due to backward iteration
         return other.offset - offset;
     }
@@ -142,7 +142,7 @@ public:
     using value_type = decltype(stl::tuple_cat(stl::make_tuple(*stl::declval<It>()), stl::forward_as_tuple(*stl::declval<Other>()...)));
     using pointer = input_iterator_pointer<value_type>;
     using reference = value_type;
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     using iterator_category = stl::input_iterator_tag;
     using iterator_concept = stl::forward_iterator_tag;
 
@@ -396,7 +396,7 @@ public:
     /*! @brief Unsigned integer type. */
     using size_type = stl::size_t;
     /*! @brief Signed integer type. */
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     /*! @brief Pointer type to contained elements. */
     using pointer = container_type::pointer;
     /*! @brief Constant pointer type to contained elements. */
@@ -794,7 +794,7 @@ public:
     /*! @brief Unsigned integer type. */
     using size_type = stl::size_t;
     /*! @brief Signed integer type. */
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     /*! @brief Extended iterable storage proxy. */
     using iterable = iterable_adaptor<internal::extended_storage_iterator<typename base_type::iterator>>;
     /*! @brief Constant extended iterable storage proxy. */
@@ -1010,7 +1010,7 @@ public:
     /*! @brief Unsigned integer type. */
     using size_type = stl::size_t;
     /*! @brief Signed integer type. */
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     /*! @brief Extended iterable storage proxy. */
     using iterable = iterable_adaptor<internal::extended_storage_iterator<typename base_type::iterator>>;
     /*! @brief Constant extended iterable storage proxy. */

+ 5 - 5
src/entt/entity/view.hpp

@@ -134,7 +134,7 @@ struct extended_view_iterator final {
     using value_type = decltype(stl::tuple_cat(stl::make_tuple(*stl::declval<It>()), stl::declval<Get>().get_as_tuple({})...));
     using pointer = input_iterator_pointer<value_type>;
     using reference = value_type;
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     using iterator_category = stl::input_iterator_tag;
     using iterator_concept = stl::forward_iterator_tag;
 
@@ -281,7 +281,7 @@ public:
     /*! @brief Unsigned integer type. */
     using size_type = stl::size_t;
     /*! @brief Signed integer type. */
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     /*! @brief Forward iterator type. */
     using iterator = internal::view_iterator<common_type, Checked, Get, Exclude>;
 
@@ -454,7 +454,7 @@ public:
     /*! @brief Unsigned integer type. */
     using size_type = base_type::size_type;
     /*! @brief Signed integer type. */
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     /*! @brief Forward iterator type. */
     using iterator = base_type::iterator;
     /*! @brief Iterable view type. */
@@ -691,7 +691,7 @@ public:
     /*! @brief Unsigned integer type. */
     using size_type = stl::size_t;
     /*! @brief Signed integer type. */
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     /*! @brief Random access iterator type. */
     using iterator = stl::conditional_t<Policy == deletion_policy::in_place, internal::view_iterator<common_type, true, 1u, 0u>, typename common_type::iterator>;
     /*! @brief Reverse iterator type. */
@@ -912,7 +912,7 @@ public:
     /*! @brief Unsigned integer type. */
     using size_type = base_type::size_type;
     /*! @brief Signed integer type. */
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     /*! @brief Random access iterator type. */
     using iterator = base_type::iterator;
     /*! @brief Reverse iterator type. */

+ 1 - 1
src/entt/graph/adjacency_matrix.hpp

@@ -29,7 +29,7 @@ public:
     using value_type = stl::pair<size_type, size_type>;
     using pointer = input_iterator_pointer<value_type>;
     using reference = value_type;
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     using iterator_category = stl::input_iterator_tag;
     using iterator_concept = stl::forward_iterator_tag;
 

+ 4 - 4
src/entt/meta/meta.hpp

@@ -1615,10 +1615,10 @@ inline bool meta_any::assign(meta_any &&other) {
 
 /*! @cond ENTT_INTERNAL */
 class meta_sequence_container::meta_iterator final {
-    using vtable_type = void(const void *, const std::ptrdiff_t, meta_any *);
+    using vtable_type = void(const void *, const stl::ptrdiff_t, meta_any *);
 
     template<typename It>
-    static void basic_vtable(const void *value, const std::ptrdiff_t offset, meta_any *other) {
+    static void basic_vtable(const void *value, const stl::ptrdiff_t offset, meta_any *other) {
         const auto &it = *static_cast<const It *>(value);
         other ? other->emplace<decltype(*it)>(*it) : std::advance(const_cast<It &>(it), offset);
     }
@@ -1627,7 +1627,7 @@ public:
     using value_type = meta_any;
     using pointer = input_iterator_pointer<value_type>;
     using reference = value_type;
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     using iterator_category = stl::input_iterator_tag;
     using iterator_concept = stl::bidirectional_iterator_tag;
 
@@ -1708,7 +1708,7 @@ public:
     using value_type = stl::pair<meta_any, meta_any>;
     using pointer = input_iterator_pointer<value_type>;
     using reference = value_type;
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     using iterator_category = stl::input_iterator_tag;
     using iterator_concept = stl::forward_iterator_tag;
 

+ 2 - 2
src/entt/meta/range.hpp

@@ -22,7 +22,7 @@ struct meta_range_iterator final {
     using value_type = stl::pair<id_type, Type>;
     using pointer = input_iterator_pointer<value_type>;
     using reference = value_type;
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     using iterator_category = stl::input_iterator_tag;
     using iterator_concept = stl::random_access_iterator_tag;
 
@@ -86,7 +86,7 @@ struct meta_range_iterator final {
         return operator[](0);
     }
 
-    [[nodiscard]] constexpr std::ptrdiff_t operator-(const meta_range_iterator &other) const noexcept {
+    [[nodiscard]] constexpr stl::ptrdiff_t operator-(const meta_range_iterator &other) const noexcept {
         return it - other.it;
     }
 

+ 2 - 2
src/entt/resource/cache.hpp

@@ -33,7 +33,7 @@ public:
     using value_type = stl::pair<id_type, resource<Type>>;
     using pointer = input_iterator_pointer<value_type>;
     using reference = value_type;
-    using difference_type = std::ptrdiff_t;
+    using difference_type = stl::ptrdiff_t;
     using iterator_category = stl::input_iterator_tag;
     using iterator_concept = stl::random_access_iterator_tag;
 
@@ -96,7 +96,7 @@ public:
     }
 
     template<typename... Args>
-    [[nodiscard]] constexpr std::ptrdiff_t operator-(const resource_cache_iterator<Args...> &other) const noexcept {
+    [[nodiscard]] constexpr stl::ptrdiff_t operator-(const resource_cache_iterator<Args...> &other) const noexcept {
         return it - other.it;
     }
 

+ 1 - 0
src/entt/stl/cstddef.hpp

@@ -6,6 +6,7 @@
 /*! @cond ENTT_INTERNAL */
 namespace entt::stl {
 
+using std::ptrdiff_t;
 using std::size_t;
 
 } // namespace entt::stl