소스 검색

stl: std::size_t

skypjack 2 일 전
부모
커밋
6b9f69d0e5
43개의 변경된 파일239개의 추가작업 그리고 234개의 파일을 삭제
  1. 15 15
      src/entt/container/dense_map.hpp
  2. 13 13
      src/entt/container/dense_set.hpp
  3. 1 1
      src/entt/container/table.hpp
  4. 7 6
      src/entt/core/algorithm.hpp
  5. 12 12
      src/entt/core/any.hpp
  6. 1 1
      src/entt/core/bit.hpp
  7. 6 6
      src/entt/core/compressed_pair.hpp
  8. 1 1
      src/entt/core/fwd.hpp
  9. 7 7
      src/entt/core/hashed_string.hpp
  10. 1 1
      src/entt/core/ident.hpp
  11. 27 27
      src/entt/core/type_traits.hpp
  12. 5 5
      src/entt/entity/component.hpp
  13. 1 1
      src/entt/entity/entity.hpp
  14. 19 19
      src/entt/entity/group.hpp
  15. 1 1
      src/entt/entity/handle.hpp
  16. 1 1
      src/entt/entity/helper.hpp
  17. 19 19
      src/entt/entity/organizer.hpp
  18. 1 1
      src/entt/entity/registry.hpp
  19. 1 1
      src/entt/entity/runtime_view.hpp
  20. 2 2
      src/entt/entity/snapshot.hpp
  21. 7 7
      src/entt/entity/sparse_set.hpp
  22. 11 11
      src/entt/entity/storage.hpp
  23. 23 23
      src/entt/entity/view.hpp
  24. 4 4
      src/entt/graph/adjacency_matrix.hpp
  25. 10 10
      src/entt/graph/flow.hpp
  26. 1 1
      src/entt/graph/fwd.hpp
  27. 2 2
      src/entt/meta/container.hpp
  28. 1 1
      src/entt/meta/factory.hpp
  29. 1 1
      src/entt/meta/fwd.hpp
  30. 2 2
      src/entt/meta/meta.hpp
  31. 7 7
      src/entt/meta/node.hpp
  32. 4 4
      src/entt/meta/utility.hpp
  33. 1 1
      src/entt/poly/fwd.hpp
  34. 7 7
      src/entt/poly/poly.hpp
  35. 1 1
      src/entt/process/scheduler.hpp
  36. 1 1
      src/entt/resource/cache.hpp
  37. 3 3
      src/entt/signal/delegate.hpp
  38. 3 3
      src/entt/signal/dispatcher.hpp
  39. 1 1
      src/entt/signal/emitter.hpp
  40. 1 1
      src/entt/signal/sigh.hpp
  41. 2 0
      src/entt/stl/cstddef.hpp
  42. 2 0
      src/entt/stl/cstdint.hpp
  43. 3 3
      src/entt/tools/davey.hpp

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

@@ -27,19 +27,19 @@ namespace entt {
 /*! @cond ENTT_INTERNAL */
 namespace internal {
 
-static constexpr std::size_t dense_map_placeholder_position = (std::numeric_limits<std::size_t>::max)();
+static constexpr stl::size_t dense_map_placeholder_position = (std::numeric_limits<stl::size_t>::max)();
 
 template<typename Key, typename Type>
 struct dense_map_node final {
     using value_type = stl::pair<Key, Type>;
 
     template<typename... Args>
-    dense_map_node(const std::size_t pos, Args &&...args)
+    dense_map_node(const stl::size_t pos, Args &&...args)
         : next{pos},
           element{stl::forward<Args>(args)...} {}
 
     template<typename... Args>
-    dense_map_node(std::allocator_arg_t, const auto &allocator, const std::size_t pos, Args &&...args)
+    dense_map_node(std::allocator_arg_t, const auto &allocator, const stl::size_t pos, Args &&...args)
         : next{pos},
           element{entt::make_obj_using_allocator<value_type>(allocator, stl::forward<Args>(args)...)} {}
 
@@ -51,7 +51,7 @@ struct dense_map_node final {
         : next{other.next},
           element{entt::make_obj_using_allocator<value_type>(allocator, stl::move(other.element))} {}
 
-    std::size_t next;
+    stl::size_t next;
     value_type element;
 };
 
@@ -169,7 +169,7 @@ public:
 
     constexpr dense_map_local_iterator() noexcept = default;
 
-    constexpr dense_map_local_iterator(It iter, const std::size_t pos) noexcept
+    constexpr dense_map_local_iterator(It iter, const stl::size_t pos) noexcept
         : it{iter},
           offset{pos} {}
 
@@ -202,13 +202,13 @@ public:
         return offset == other.offset;
     }
 
-    [[nodiscard]] constexpr std::size_t index() const noexcept {
+    [[nodiscard]] constexpr stl::size_t index() const noexcept {
         return offset;
     }
 
 private:
     It it{};
-    std::size_t offset{dense_map_placeholder_position};
+    stl::size_t offset{dense_map_placeholder_position};
 };
 
 } // namespace internal
@@ -230,21 +230,21 @@ private:
 template<typename Key, typename Type, typename Hash, typename KeyEqual, typename Allocator>
 class dense_map {
     static constexpr float default_threshold = 0.875f;
-    static constexpr std::size_t minimum_capacity = 8u;
-    static constexpr std::size_t placeholder_position = internal::dense_map_placeholder_position;
+    static constexpr stl::size_t minimum_capacity = 8u;
+    static constexpr stl::size_t placeholder_position = internal::dense_map_placeholder_position;
 
     using node_type = internal::dense_map_node<Key, Type>;
     using alloc_traits = std::allocator_traits<Allocator>;
     static_assert(stl::is_same_v<typename alloc_traits::value_type, stl::pair<const Key, Type>>, "Invalid value type");
-    using sparse_container_type = stl::vector<std::size_t, typename alloc_traits::template rebind_alloc<std::size_t>>;
+    using sparse_container_type = stl::vector<stl::size_t, typename alloc_traits::template rebind_alloc<stl::size_t>>;
     using packed_container_type = stl::vector<node_type, typename alloc_traits::template rebind_alloc<node_type>>;
 
-    [[nodiscard]] std::size_t key_to_bucket(const auto &key) const noexcept {
+    [[nodiscard]] stl::size_t key_to_bucket(const auto &key) const noexcept {
         // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-array-to-pointer-decay)
         return fast_mod(static_cast<size_type>(sparse.second()(key)), bucket_count());
     }
 
-    [[nodiscard]] auto constrained_find(const auto &key, const std::size_t bucket) {
+    [[nodiscard]] auto constrained_find(const auto &key, const stl::size_t bucket) {
         for(auto offset = sparse.first()[bucket]; offset != placeholder_position; offset = packed.first()[offset].next) {
             if(packed.second()(packed.first()[offset].element.first, key)) {
                 return begin() + static_cast<iterator::difference_type>(offset);
@@ -254,7 +254,7 @@ class dense_map {
         return end();
     }
 
-    [[nodiscard]] auto constrained_find(const auto &key, const std::size_t bucket) const {
+    [[nodiscard]] auto constrained_find(const auto &key, const stl::size_t bucket) const {
         for(auto offset = sparse.first()[bucket]; offset != placeholder_position; offset = packed.first()[offset].next) {
             if(packed.second()(packed.first()[offset].element.first, key)) {
                 return cbegin() + static_cast<const_iterator::difference_type>(offset);
@@ -295,7 +295,7 @@ class dense_map {
         return stl::make_pair(--end(), true);
     }
 
-    void move_and_pop(const std::size_t pos) {
+    void move_and_pop(const stl::size_t pos) {
         if(const auto last = size() - 1u; pos != last) {
             size_type *curr = &sparse.first()[key_to_bucket(packed.first().back().element.first)];
             packed.first()[pos] = stl::move(packed.first().back());
@@ -322,7 +322,7 @@ public:
     /*! @brief Key-value type of the container. */
     using value_type = stl::pair<const Key, Type>;
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Signed integer type. */
     using difference_type = std::ptrdiff_t;
     /*! @brief Type of function to use to hash the keys. */

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

@@ -25,7 +25,7 @@ namespace entt {
 /*! @cond ENTT_INTERNAL */
 namespace internal {
 
-static constexpr std::size_t dense_set_placeholder_position = (std::numeric_limits<std::size_t>::max)();
+static constexpr stl::size_t dense_set_placeholder_position = (std::numeric_limits<stl::size_t>::max)();
 
 template<typename It>
 class dense_set_iterator final {
@@ -135,7 +135,7 @@ public:
 
     constexpr dense_set_local_iterator() noexcept = default;
 
-    constexpr dense_set_local_iterator(It iter, const std::size_t pos) noexcept
+    constexpr dense_set_local_iterator(It iter, const stl::size_t pos) noexcept
         : it{iter},
           offset{pos} {}
 
@@ -167,13 +167,13 @@ public:
         return offset == other.offset;
     }
 
-    [[nodiscard]] constexpr std::size_t index() const noexcept {
+    [[nodiscard]] constexpr stl::size_t index() const noexcept {
         return offset;
     }
 
 private:
     It it{};
-    std::size_t offset{dense_set_placeholder_position};
+    stl::size_t offset{dense_set_placeholder_position};
 };
 
 } // namespace internal
@@ -194,20 +194,20 @@ private:
 template<typename Type, typename Hash, typename KeyEqual, typename Allocator>
 class dense_set {
     static constexpr float default_threshold = 0.875f;
-    static constexpr std::size_t minimum_capacity = 8u;
-    static constexpr std::size_t placeholder_position = internal::dense_set_placeholder_position;
+    static constexpr stl::size_t minimum_capacity = 8u;
+    static constexpr stl::size_t placeholder_position = internal::dense_set_placeholder_position;
 
-    using node_type = stl::pair<std::size_t, Type>;
+    using node_type = stl::pair<stl::size_t, Type>;
     using alloc_traits = std::allocator_traits<Allocator>;
     static_assert(stl::is_same_v<typename alloc_traits::value_type, Type>, "Invalid value type");
-    using sparse_container_type = stl::vector<std::size_t, typename alloc_traits::template rebind_alloc<std::size_t>>;
+    using sparse_container_type = stl::vector<stl::size_t, typename alloc_traits::template rebind_alloc<stl::size_t>>;
     using packed_container_type = stl::vector<node_type, typename alloc_traits::template rebind_alloc<node_type>>;
 
-    [[nodiscard]] std::size_t value_to_bucket(const auto &value) const noexcept {
+    [[nodiscard]] stl::size_t value_to_bucket(const auto &value) const noexcept {
         return fast_mod(static_cast<size_type>(sparse.second()(value)), bucket_count());
     }
 
-    [[nodiscard]] auto constrained_find(const auto &value, const std::size_t bucket) {
+    [[nodiscard]] auto constrained_find(const auto &value, const stl::size_t bucket) {
         for(auto offset = sparse.first()[bucket]; offset != placeholder_position; offset = packed.first()[offset].first) {
             if(packed.second()(packed.first()[offset].second, value)) {
                 return begin() + static_cast<iterator::difference_type>(offset);
@@ -217,7 +217,7 @@ class dense_set {
         return end();
     }
 
-    [[nodiscard]] auto constrained_find(const auto &value, const std::size_t bucket) const {
+    [[nodiscard]] auto constrained_find(const auto &value, const stl::size_t bucket) const {
         for(auto offset = sparse.first()[bucket]; offset != placeholder_position; offset = packed.first()[offset].first) {
             if(packed.second()(packed.first()[offset].second, value)) {
                 return cbegin() + static_cast<const_iterator::difference_type>(offset);
@@ -242,7 +242,7 @@ class dense_set {
         return stl::make_pair(--end(), true);
     }
 
-    void move_and_pop(const std::size_t pos) {
+    void move_and_pop(const stl::size_t pos) {
         if(const auto last = size() - 1u; pos != last) {
             size_type *curr = &sparse.first()[value_to_bucket(packed.first().back().second)];
             packed.first()[pos] = stl::move(packed.first().back());
@@ -267,7 +267,7 @@ public:
     /*! @brief Value type of the container. */
     using value_type = Type;
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Signed integer type. */
     using difference_type = std::ptrdiff_t;
     /*! @brief Type of function to use to hash the elements. */

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

@@ -123,7 +123,7 @@ class basic_table {
 
 public:
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Signed integer type. */
     using difference_type = std::ptrdiff_t;
     /*! @brief Input iterator type. */

+ 7 - 6
src/entt/core/algorithm.hpp

@@ -4,6 +4,7 @@
 #include <concepts>
 #include <functional>
 #include "../stl/algorithm.hpp"
+#include "../stl/cstddef.hpp"
 #include "../stl/functional.hpp"
 #include "../stl/iterator.hpp"
 #include "../stl/utility.hpp"
@@ -74,7 +75,7 @@ struct insertion_sort {
  * @tparam Bit Number of bits processed per pass.
  * @tparam N Maximum number of bits to sort.
  */
-template<std::size_t Bit, std::size_t N>
+template<stl::size_t Bit, stl::size_t N>
 requires ((N % Bit) == 0) // The maximum number of bits to sort must be a multiple of the number of bits processed per pass
 struct radix_sort {
     /**
@@ -99,23 +100,23 @@ struct radix_sort {
 
             using value_type = stl::iterator_traits<It>::value_type;
             using difference_type = stl::iterator_traits<It>::difference_type;
-            stl::vector<value_type> aux(static_cast<std::size_t>(stl::distance(first, last)));
+            stl::vector<value_type> aux(static_cast<stl::size_t>(stl::distance(first, last)));
 
             auto part = [getter = stl::move(getter)](auto from, auto to, auto out, auto start) {
                 constexpr auto mask = (1 << Bit) - 1;
                 constexpr auto buckets = 1 << Bit;
 
                 // NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays, misc-const-correctness)
-                std::size_t count[buckets]{};
+                stl::size_t count[buckets]{};
 
                 for(auto it = from; it != to; ++it) {
                     ++count[(getter(*it) >> start) & mask];
                 }
 
                 // NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays)
-                std::size_t index[buckets]{};
+                stl::size_t index[buckets]{};
 
-                for(std::size_t pos{}, end = buckets - 1u; pos < end; ++pos) {
+                for(stl::size_t pos{}, end = buckets - 1u; pos < end; ++pos) {
                     index[pos + 1u] = index[pos] + count[pos];
                 }
 
@@ -125,7 +126,7 @@ struct radix_sort {
                 }
             };
 
-            for(std::size_t pass = 0; pass < (passes & ~1u); pass += 2) {
+            for(stl::size_t pass = 0; pass < (passes & ~1u); pass += 2) {
                 part(first, last, aux.begin(), pass * Bit);
                 part(aux.begin(), aux.end(), first, (pass + 1) * Bit);
             }

+ 12 - 12
src/entt/core/any.hpp

@@ -27,7 +27,7 @@ enum class any_request : std::uint8_t {
     move
 };
 
-template<std::size_t Len, std::size_t Align>
+template<stl::size_t Len, stl::size_t Align>
 struct basic_any_storage {
     static constexpr bool has_buffer = true;
     union {
@@ -37,17 +37,17 @@ struct basic_any_storage {
     };
 };
 
-template<std::size_t Align>
+template<stl::size_t Align>
 struct basic_any_storage<0u, Align> {
     static constexpr bool has_buffer = false;
     const void *instance{};
 };
 
-template<typename Type, std::size_t Len, std::size_t Align>
+template<typename Type, stl::size_t Len, stl::size_t Align>
 // NOLINTNEXTLINE(bugprone-sizeof-expression)
 struct in_situ: stl::bool_constant<(Len != 0u) && alignof(Type) <= Align && sizeof(Type) <= Len && stl::is_nothrow_move_constructible_v<Type>> {};
 
-template<std::size_t Len, std::size_t Align>
+template<stl::size_t Len, stl::size_t Align>
 struct in_situ<void, Len, Align>: stl::false_type {};
 
 } // namespace internal
@@ -58,7 +58,7 @@ struct in_situ<void, Len, Align>: stl::false_type {};
  * @tparam Len Size of the buffer reserved for the small buffer optimization.
  * @tparam Align Optional alignment requirement.
  */
-template<std::size_t Len, std::size_t Align>
+template<stl::size_t Len, stl::size_t Align>
 class basic_any: private internal::basic_any_storage<Len, Align> {
     using request = internal::any_request;
     using base_type = internal::basic_any_storage<Len, Align>;
@@ -540,7 +540,7 @@ private:
  * @param data Target any object.
  * @return The element converted to the requested type.
  */
-template<typename Type, std::size_t Len, std::size_t Align>
+template<typename Type, stl::size_t Len, stl::size_t Align>
 [[nodiscard]] stl::remove_const_t<Type> any_cast(const basic_any<Len, Align> &data) noexcept {
     const auto *const instance = any_cast<stl::remove_reference_t<Type>>(&data);
     ENTT_ASSERT(instance, "Invalid instance");
@@ -548,7 +548,7 @@ template<typename Type, std::size_t Len, std::size_t Align>
 }
 
 /*! @copydoc any_cast */
-template<typename Type, std::size_t Len, std::size_t Align>
+template<typename Type, stl::size_t Len, stl::size_t Align>
 [[nodiscard]] stl::remove_const_t<Type> any_cast(basic_any<Len, Align> &data) noexcept {
     // forces const on non-reference types to make them work also with wrappers for const references
     auto *const instance = any_cast<stl::remove_reference_t<const Type>>(&data);
@@ -557,7 +557,7 @@ template<typename Type, std::size_t Len, std::size_t Align>
 }
 
 /*! @copydoc any_cast */
-template<typename Type, std::size_t Len, std::size_t Align>
+template<typename Type, stl::size_t Len, stl::size_t Align>
 // NOLINTNEXTLINE(cppcoreguidelines-rvalue-reference-param-not-moved)
 [[nodiscard]] stl::remove_const_t<Type> any_cast(basic_any<Len, Align> &&data) noexcept {
     if constexpr(stl::is_copy_constructible_v<stl::remove_cvref_t<Type>>) {
@@ -574,13 +574,13 @@ template<typename Type, std::size_t Len, std::size_t Align>
 }
 
 /*! @copydoc any_cast */
-template<typename Type, std::size_t Len, std::size_t Align>
+template<typename Type, stl::size_t Len, stl::size_t Align>
 [[nodiscard]] const Type *any_cast(const basic_any<Len, Align> *data) noexcept {
     return data->template data<stl::remove_const_t<Type>>();
 }
 
 /*! @copydoc any_cast */
-template<typename Type, std::size_t Len, std::size_t Align>
+template<typename Type, stl::size_t Len, stl::size_t Align>
 [[nodiscard]] Type *any_cast(basic_any<Len, Align> *data) noexcept {
     if constexpr(stl::is_const_v<Type>) {
         // last attempt to make wrappers for const references return their values
@@ -599,7 +599,7 @@ template<typename Type, std::size_t Len, std::size_t Align>
  * @param args Parameters to use to construct the instance.
  * @return A properly initialized wrapper for an object of the given type.
  */
-template<typename Type, std::size_t Len = basic_any<>::length, std::size_t Align = basic_any<Len>::alignment, typename... Args>
+template<typename Type, stl::size_t Len = basic_any<>::length, stl::size_t Align = basic_any<Len>::alignment, typename... Args>
 [[nodiscard]] basic_any<Len, Align> make_any(Args &&...args) {
     return basic_any<Len, Align>{stl::in_place_type<Type>, stl::forward<Args>(args)...};
 }
@@ -612,7 +612,7 @@ template<typename Type, std::size_t Len = basic_any<>::length, std::size_t Align
  * @param value Parameter to use to construct the instance.
  * @return A properly initialized and not necessarily owning wrapper.
  */
-template<std::size_t Len = basic_any<>::length, std::size_t Align = basic_any<Len>::alignment, typename Type>
+template<stl::size_t Len = basic_any<>::length, stl::size_t Align = basic_any<Len>::alignment, typename Type>
 [[nodiscard]] basic_any<Len, Align> forward_as_any(Type &&value) {
     return basic_any<Len, Align>{stl::in_place_type<Type &&>, stl::forward<Type>(value)};
 }

+ 1 - 1
src/entt/core/bit.hpp

@@ -16,7 +16,7 @@ namespace entt {
  * @return The common remainder.
  */
 template<std::unsigned_integral Type>
-[[nodiscard]] constexpr Type fast_mod(const Type value, const std::size_t mod) noexcept {
+[[nodiscard]] constexpr Type fast_mod(const Type value, const stl::size_t mod) noexcept {
     ENTT_ASSERT_CONSTEXPR(std::has_single_bit(mod), "Value must be a power of two");
     return static_cast<Type>(value & (mod - 1u));
 }

+ 6 - 6
src/entt/core/compressed_pair.hpp

@@ -14,7 +14,7 @@ namespace entt {
 /*! @cond ENTT_INTERNAL */
 namespace internal {
 
-template<typename Type, std::size_t>
+template<typename Type, stl::size_t>
 struct compressed_pair_element {
     using reference = Type &;
     using const_reference = const Type &;
@@ -28,7 +28,7 @@ struct compressed_pair_element {
     requires (!std::same_as<stl::remove_cvref_t<Arg>, compressed_pair_element>)
         : value{stl::forward<Arg>(arg)} {}
 
-    template<typename... Args, std::size_t... Index>
+    template<typename... Args, stl::size_t... Index>
     constexpr compressed_pair_element(stl::tuple<Args...> args, std::index_sequence<Index...>) noexcept(stl::is_nothrow_constructible_v<Type, Args...>)
         : value{stl::forward<Args>(std::get<Index>(args))...} {}
 
@@ -44,7 +44,7 @@ private:
     Type value{};
 };
 
-template<typename Type, std::size_t Tag>
+template<typename Type, stl::size_t Tag>
 requires is_ebco_eligible_v<Type>
 struct compressed_pair_element<Type, Tag>: Type {
     using reference = Type &;
@@ -60,7 +60,7 @@ struct compressed_pair_element<Type, Tag>: Type {
     requires (!std::same_as<stl::remove_cvref_t<Arg>, compressed_pair_element>)
         : base_type{stl::forward<Arg>(arg)} {}
 
-    template<typename... Args, std::size_t... Index>
+    template<typename... Args, stl::size_t... Index>
     constexpr compressed_pair_element(stl::tuple<Args...> args, std::index_sequence<Index...>) noexcept(stl::is_nothrow_constructible_v<base_type, Args...>)
         : base_type{stl::forward<Args>(std::get<Index>(args))...} {}
 
@@ -204,7 +204,7 @@ public:
      * @return Returns a reference to the first element if `Index` is 0 and a
      * reference to the second element if `Index` is 1.
      */
-    template<std::size_t Index>
+    template<stl::size_t Index>
     requires (Index <= 1u)
     [[nodiscard]] constexpr decltype(auto) get() noexcept {
         if constexpr(Index == 0u) {
@@ -215,7 +215,7 @@ public:
     }
 
     /*! @copydoc get */
-    template<std::size_t Index>
+    template<stl::size_t Index>
     requires (Index <= 1u)
     [[nodiscard]] constexpr decltype(auto) get() const noexcept {
         if constexpr(Index == 0u) {

+ 1 - 1
src/entt/core/fwd.hpp

@@ -22,7 +22,7 @@ enum class any_policy : std::uint8_t {
 };
 
 // NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays)
-template<std::size_t Len = sizeof(double[2]), std::size_t = alignof(double[2])>
+template<stl::size_t Len = sizeof(double[2]), stl::size_t = alignof(double[2])>
 class basic_any;
 
 /*! @brief Alias declaration for type identifiers. */

+ 7 - 7
src/entt/core/hashed_string.hpp

@@ -28,7 +28,7 @@ struct fnv_1a_params<std::uint64_t> {
 template<typename Char>
 struct basic_hashed_string {
     using value_type = Char;
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     using hash_type = id_type;
 
     const value_type *repr{};
@@ -91,7 +91,7 @@ public:
      * @param str Human-readable identifier.
      * @return The numeric representation of the string.
      */
-    template<std::size_t N>
+    template<stl::size_t N>
     // NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays)
     [[nodiscard]] static ENTT_CONSTEVAL hash_type value(const value_type (&str)[N]) noexcept {
         return basic_hashed_string{str};
@@ -130,7 +130,7 @@ public:
      * @tparam N Number of characters of the identifier.
      * @param str Human-readable identifier.
      */
-    template<std::size_t N>
+    template<stl::size_t N>
     // NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays)
     ENTT_CONSTEVAL basic_hashed_string(const value_type (&str)[N]) noexcept
         // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-array-to-pointer-decay)
@@ -221,7 +221,7 @@ public:
  * @param len Length of the string to hash.
  */
 template<typename Char>
-basic_hashed_string(const Char *str, std::size_t len) -> basic_hashed_string<Char>;
+basic_hashed_string(const Char *str, stl::size_t len) -> basic_hashed_string<Char>;
 
 /**
  * @brief Deduction guide.
@@ -229,7 +229,7 @@ basic_hashed_string(const Char *str, std::size_t len) -> basic_hashed_string<Cha
  * @tparam N Number of characters of the identifier.
  * @param str Human-readable identifier.
  */
-template<typename Char, std::size_t N>
+template<typename Char, stl::size_t N>
 // NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays)
 basic_hashed_string(const Char (&str)[N]) -> basic_hashed_string<Char>;
 
@@ -240,7 +240,7 @@ inline namespace literals {
  * @param str The literal without its suffix.
  * @return A properly initialized hashed string.
  */
-[[nodiscard]] ENTT_CONSTEVAL hashed_string operator""_hs(const char *str, std::size_t) noexcept {
+[[nodiscard]] ENTT_CONSTEVAL hashed_string operator""_hs(const char *str, stl::size_t) noexcept {
     return hashed_string{str};
 }
 
@@ -249,7 +249,7 @@ inline namespace literals {
  * @param str The literal without its suffix.
  * @return A properly initialized hashed wstring.
  */
-[[nodiscard]] ENTT_CONSTEVAL hashed_wstring operator""_hws(const wchar_t *str, std::size_t) noexcept {
+[[nodiscard]] ENTT_CONSTEVAL hashed_wstring operator""_hws(const wchar_t *str, stl::size_t) noexcept {
     return hashed_wstring{str};
 }
 

+ 1 - 1
src/entt/core/ident.hpp

@@ -15,7 +15,7 @@ namespace entt {
  */
 template<typename... Type>
 class ident {
-    template<typename Curr, std::size_t... Index>
+    template<typename Curr, stl::size_t... Index>
     [[nodiscard]] static ENTT_CONSTEVAL id_type get(std::index_sequence<Index...>) noexcept {
         return (0 + ... + (stl::is_same_v<Curr, type_list_element_t<Index, type_list<stl::decay_t<Type>...>>> ? id_type{Index} : id_type{}));
     }

+ 27 - 27
src/entt/core/type_traits.hpp

@@ -16,7 +16,7 @@ namespace entt {
  * @brief Utility class to disambiguate overloaded functions.
  * @tparam N Number of choices available.
  */
-template<std::size_t N>
+template<stl::size_t N>
 struct choice_t
     // unfortunately, doxygen cannot parse such a construct
     : /*! @cond ENTT_INTERNAL */ choice_t<N - 1> /*! @endcond */
@@ -30,7 +30,7 @@ struct choice_t<0> {};
  * @brief Variable template for the choice trick.
  * @tparam N Number of choices available.
  */
-template<std::size_t N>
+template<stl::size_t N>
 inline constexpr choice_t<N> choice{};
 
 /**
@@ -38,21 +38,21 @@ inline constexpr choice_t<N> choice{};
  * @tparam Type The type of which to return the size.
  */
 template<typename Type>
-struct size_of: std::integral_constant<std::size_t, 0u> {};
+struct size_of: std::integral_constant<stl::size_t, 0u> {};
 
 /*! @copydoc size_of */
 template<typename Type>
 requires requires { sizeof(Type); }
 struct size_of<Type>
     // NOLINTNEXTLINE(bugprone-sizeof-expression)
-    : std::integral_constant<std::size_t, sizeof(Type)> {};
+    : std::integral_constant<stl::size_t, sizeof(Type)> {};
 
 /**
  * @brief Helper variable template.
  * @tparam Type The type of which to return the size.
  */
 template<typename Type>
-inline constexpr std::size_t size_of_v = size_of<Type>::value;
+inline constexpr stl::size_t size_of_v = size_of<Type>::value;
 
 /**
  * @brief Using declaration to be used to _repeat_ the same type a number of
@@ -97,7 +97,7 @@ struct type_list {
 };
 
 /*! @brief Primary template isn't defined on purpose. */
-template<std::size_t, typename>
+template<stl::size_t, typename>
 struct type_list_element;
 
 /**
@@ -106,7 +106,7 @@ struct type_list_element;
  * @tparam First First type provided by the type list.
  * @tparam Other Other types provided by the type list.
  */
-template<std::size_t Index, typename First, typename... Other>
+template<stl::size_t Index, typename First, typename... Other>
 struct type_list_element<Index, type_list<First, Other...>>
     : type_list_element<Index - 1u, type_list<Other...>> {};
 
@@ -126,7 +126,7 @@ struct type_list_element<0u, type_list<First, Other...>> {
  * @tparam Index Index of the type to return.
  * @tparam List Type list to search into.
  */
-template<std::size_t Index, typename List>
+template<stl::size_t Index, typename List>
 using type_list_element_t = type_list_element<Index, List>::type;
 
 /*! @brief Primary template isn't defined on purpose. */
@@ -142,7 +142,7 @@ struct type_list_index;
 template<typename Type, typename First, typename... Other>
 struct type_list_index<Type, type_list<First, Other...>> {
     /*! @brief Unsigned integer type. */
-    using value_type = std::size_t;
+    using value_type = stl::size_t;
     /*! @brief Compile-time position of the given type in the sublist. */
     static constexpr value_type value = 1u + type_list_index<Type, type_list<Other...>>::value;
 };
@@ -156,7 +156,7 @@ template<typename Type, typename... Other>
 struct type_list_index<Type, type_list<Type, Other...>> {
     static_assert(type_list_index<Type, type_list<Other...>>::value == sizeof...(Other), "Non-unique type");
     /*! @brief Unsigned integer type. */
-    using value_type = std::size_t;
+    using value_type = stl::size_t;
     /*! @brief Compile-time position of the given type in the sublist. */
     static constexpr value_type value = 0u;
 };
@@ -168,7 +168,7 @@ struct type_list_index<Type, type_list<Type, Other...>> {
 template<typename Type>
 struct type_list_index<Type, type_list<>> {
     /*! @brief Unsigned integer type. */
-    using value_type = std::size_t;
+    using value_type = stl::size_t;
     /*! @brief Compile-time position of the given type in the sublist. */
     static constexpr value_type value = 0u;
 };
@@ -179,7 +179,7 @@ struct type_list_index<Type, type_list<>> {
  * @tparam Type Type to look for and for which to return the index.
  */
 template<typename Type, typename List>
-inline constexpr std::size_t type_list_index_v = type_list_index<Type, List>::value;
+inline constexpr stl::size_t type_list_index_v = type_list_index<Type, List>::value;
 
 /**
  * @brief Concatenates multiple type lists.
@@ -352,7 +352,7 @@ struct value_list {
 };
 
 /*! @brief Primary template isn't defined on purpose. */
-template<std::size_t, typename>
+template<stl::size_t, typename>
 struct value_list_element;
 
 /**
@@ -361,7 +361,7 @@ struct value_list_element;
  * @tparam Value First value provided by the value list.
  * @tparam Other Other values provided by the value list.
  */
-template<std::size_t Index, auto Value, auto... Other>
+template<stl::size_t Index, auto Value, auto... Other>
 struct value_list_element<Index, value_list<Value, Other...>>
     : value_list_element<Index - 1u, value_list<Other...>> {};
 
@@ -383,7 +383,7 @@ struct value_list_element<0u, value_list<Value, Other...>> {
  * @tparam Index Index of the type to return.
  * @tparam List Value list to search into.
  */
-template<std::size_t Index, typename List>
+template<stl::size_t Index, typename List>
 using value_list_element_t = value_list_element<Index, List>::type;
 
 /**
@@ -391,7 +391,7 @@ using value_list_element_t = value_list_element<Index, List>::type;
  * @tparam Index Index of the value to return.
  * @tparam List Value list to search into.
  */
-template<std::size_t Index, typename List>
+template<stl::size_t Index, typename List>
 inline constexpr auto value_list_element_v = value_list_element<Index, List>::value;
 
 /*! @brief Primary template isn't defined on purpose. */
@@ -407,7 +407,7 @@ struct value_list_index;
 template<auto Value, auto First, auto... Other>
 struct value_list_index<Value, value_list<First, Other...>> {
     /*! @brief Unsigned integer type. */
-    using value_type = std::size_t;
+    using value_type = stl::size_t;
     /*! @brief Compile-time position of the given value in the sublist. */
     static constexpr value_type value = 1u + value_list_index<Value, value_list<Other...>>::value;
 };
@@ -421,7 +421,7 @@ template<auto Value, auto... Other>
 struct value_list_index<Value, value_list<Value, Other...>> {
     static_assert(value_list_index<Value, value_list<Other...>>::value == sizeof...(Other), "Non-unique type");
     /*! @brief Unsigned integer type. */
-    using value_type = std::size_t;
+    using value_type = stl::size_t;
     /*! @brief Compile-time position of the given value in the sublist. */
     static constexpr value_type value = 0u;
 };
@@ -433,7 +433,7 @@ struct value_list_index<Value, value_list<Value, Other...>> {
 template<auto Value>
 struct value_list_index<Value, value_list<>> {
     /*! @brief Unsigned integer type. */
-    using value_type = std::size_t;
+    using value_type = stl::size_t;
     /*! @brief Compile-time position of the given type in the sublist. */
     static constexpr value_type value = 0u;
 };
@@ -444,7 +444,7 @@ struct value_list_index<Value, value_list<>> {
  * @tparam Value Value to look for and for which to return the index.
  */
 template<auto Value, typename List>
-inline constexpr std::size_t value_list_index_v = value_list_index<Value, List>::value;
+inline constexpr stl::size_t value_list_index_v = value_list_index<Value, List>::value;
 
 /**
  * @brief Concatenates multiple value lists.
@@ -739,7 +739,7 @@ struct has_value_type<Type>: stl::true_type {};
 template<typename>
 [[nodiscard]] ENTT_CONSTEVAL bool dispatch_is_equality_comparable();
 
-template<typename Type, std::size_t... Index>
+template<typename Type, stl::size_t... Index>
 [[nodiscard]] ENTT_CONSTEVAL bool unpack_maybe_equality_comparable(std::index_sequence<Index...>) {
     return (dispatch_is_equality_comparable<stl::tuple_element_t<Index, Type>>() && ...);
 }
@@ -859,7 +859,7 @@ using member_class_t = member_class<Member>::type;
  * @tparam Index The index of the argument to extract.
  * @tparam Candidate A valid _callable_ type.
  */
-template<std::size_t Index, typename Candidate>
+template<stl::size_t Index, typename Candidate>
 class nth_argument {
     template<typename Ret, typename... Args>
     static ENTT_CONSTEVAL type_list<Args...> pick_up(Ret (*)(Args...));
@@ -886,21 +886,21 @@ public:
  * @tparam Index The index of the argument to extract.
  * @tparam Candidate A valid function, member function or data member type.
  */
-template<std::size_t Index, typename Candidate>
+template<stl::size_t Index, typename Candidate>
 using nth_argument_t = nth_argument<Index, Candidate>::type;
 
 } // namespace entt
 
 template<typename... Type>
-struct entt::stl::tuple_size<entt::type_list<Type...>>: std::integral_constant<std::size_t, entt::type_list<Type...>::size> {};
+struct entt::stl::tuple_size<entt::type_list<Type...>>: std::integral_constant<entt::stl::size_t, entt::type_list<Type...>::size> {};
 
-template<std::size_t Index, typename... Type>
+template<entt::stl::size_t Index, typename... Type>
 struct entt::stl::tuple_element<Index, entt::type_list<Type...>>: entt::type_list_element<Index, entt::type_list<Type...>> {};
 
 template<auto... Value>
-struct entt::stl::tuple_size<entt::value_list<Value...>>: std::integral_constant<std::size_t, entt::value_list<Value...>::size> {};
+struct entt::stl::tuple_size<entt::value_list<Value...>>: std::integral_constant<entt::stl::size_t, entt::value_list<Value...>::size> {};
 
-template<std::size_t Index, auto... Value>
+template<entt::stl::size_t Index, auto... Value>
 struct entt::stl::tuple_element<Index, entt::value_list<Value...>>: entt::value_list_element<Index, entt::value_list<Value...>> {};
 
 #endif

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

@@ -24,14 +24,14 @@ requires Type::in_place_delete
 struct in_place_delete<Type>: stl::true_type {};
 
 template<typename Type>
-struct page_size: std::integral_constant<std::size_t, !stl::is_empty_v<ENTT_ETO_TYPE(Type)> * ENTT_PACKED_PAGE> {};
+struct page_size: std::integral_constant<stl::size_t, !stl::is_empty_v<ENTT_ETO_TYPE(Type)> * ENTT_PACKED_PAGE> {};
 
 template<>
-struct page_size<void>: std::integral_constant<std::size_t, 0u> {};
+struct page_size<void>: std::integral_constant<stl::size_t, 0u> {};
 
 template<typename Type>
-requires stl::is_convertible_v<decltype(Type::page_size), std::size_t>
-struct page_size<Type>: std::integral_constant<std::size_t, Type::page_size> {};
+requires stl::is_convertible_v<decltype(Type::page_size), stl::size_t>
+struct page_size<Type>: std::integral_constant<stl::size_t, Type::page_size> {};
 
 } // namespace internal
 /*! @endcond */
@@ -51,7 +51,7 @@ struct component_traits {
     /*! @brief Pointer stability, default is `false`. */
     static constexpr bool in_place_delete = internal::in_place_delete<Type>::value;
     /*! @brief Page size, default is `ENTT_PACKED_PAGE` for non-empty types. */
-    static constexpr std::size_t page_size = internal::page_size<Type>::value;
+    static constexpr stl::size_t page_size = internal::page_size<Type>::value;
 };
 
 } // namespace entt

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

@@ -179,7 +179,7 @@ struct entt_traits: basic_entt_traits<internal::entt_traits<Type>> {
     /*! @brief Base type. */
     using base_type = basic_entt_traits<internal::entt_traits<Type>>;
     /*! @brief Page size, default is `ENTT_SPARSE_PAGE`. */
-    static constexpr std::size_t page_size = ENTT_SPARSE_PAGE;
+    static constexpr stl::size_t page_size = ENTT_SPARSE_PAGE;
 };
 
 /**

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

@@ -85,18 +85,18 @@ private:
 };
 
 struct group_descriptor {
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     virtual ~group_descriptor() = default;
     [[nodiscard]] virtual bool owned(const id_type) const noexcept {
         return false;
     }
 };
 
-template<typename Type, std::size_t Owned, std::size_t Get, std::size_t Exclude>
+template<typename Type, stl::size_t Owned, stl::size_t Get, stl::size_t Exclude>
 class group_handler final: public group_descriptor {
     using entity_type = Type::entity_type;
 
-    void swap_elements(const std::size_t pos, const entity_type entt) {
+    void swap_elements(const stl::size_t pos, const entity_type entt) {
         for(size_type next{}; next < Owned; ++next) {
             pools[next]->swap_elements((*pools[next])[pos], entt);
         }
@@ -156,7 +156,7 @@ public:
         return len;
     }
 
-    template<std::size_t Index>
+    template<stl::size_t Index>
     [[nodiscard]] common_type *storage() const noexcept {
         if constexpr(Index < (Owned + Get)) {
             return pools[Index];
@@ -168,10 +168,10 @@ public:
 private:
     stl::array<common_type *, (Owned + Get)> pools;
     stl::array<common_type *, Exclude> filter;
-    std::size_t len{};
+    stl::size_t len{};
 };
 
-template<typename Type, std::size_t Get, std::size_t Exclude>
+template<typename Type, stl::size_t Get, stl::size_t Exclude>
 class group_handler<Type, 0u, Get, Exclude> final: public group_descriptor {
     using entity_type = Type::entity_type;
 
@@ -222,7 +222,7 @@ public:
         return elem;
     }
 
-    template<std::size_t Index>
+    template<stl::size_t Index>
     [[nodiscard]] common_type *storage() const noexcept {
         if constexpr(Index < Get) {
             return pools[Index];
@@ -277,9 +277,9 @@ class basic_group<owned_t<>, get_t<Get...>, exclude_t<Exclude...>> {
     using underlying_type = base_type::entity_type;
 
     template<typename Type>
-    static constexpr std::size_t index_of = type_list_index_v<stl::remove_const_t<Type>, type_list<typename Get::element_type..., typename Exclude::element_type...>>;
+    static constexpr stl::size_t index_of = type_list_index_v<stl::remove_const_t<Type>, type_list<typename Get::element_type..., typename Exclude::element_type...>>;
 
-    template<std::size_t... Index>
+    template<stl::size_t... Index>
     [[nodiscard]] auto pools_for(std::index_sequence<Index...>) const noexcept {
         using return_type = stl::tuple<Get *...>;
         return descriptor ? return_type{static_cast<Get *>(descriptor->template storage<Index>())...} : return_type{};
@@ -289,7 +289,7 @@ public:
     /*! @brief Underlying entity identifier. */
     using entity_type = underlying_type;
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Signed integer type. */
     using difference_type = std::ptrdiff_t;
     /*! @brief Common type among all storage types. */
@@ -345,7 +345,7 @@ public:
      * @tparam Index Index of the storage to return.
      * @return The storage for the given index.
      */
-    template<std::size_t Index>
+    template<stl::size_t Index>
     [[nodiscard]] auto *storage() const noexcept {
         using type = type_list_element_t<Index, type_list<Get..., Exclude...>>;
         return *this ? static_cast<type *>(descriptor->template storage<Index>()) : nullptr;
@@ -498,7 +498,7 @@ public:
      * @param entt A valid identifier.
      * @return The elements assigned to the entity.
      */
-    template<std::size_t... Index>
+    template<stl::size_t... Index>
     [[nodiscard]] decltype(auto) get(const entity_type entt) const {
         const auto cpools = pools_for(std::index_sequence_for<Get...>{});
 
@@ -613,7 +613,7 @@ public:
      * @param algo A valid sort function object.
      * @param args Arguments to forward to the sort function object, if any.
      */
-    template<std::size_t... Index, typename Compare, typename Sort = std_sort, typename... Args>
+    template<stl::size_t... Index, typename Compare, typename Sort = std_sort, typename... Args>
     void sort(Compare compare, Sort algo = Sort{}, Args &&...args) {
         if(*this) {
             if constexpr(sizeof...(Index) == 0) {
@@ -691,9 +691,9 @@ class basic_group<owned_t<Owned...>, get_t<Get...>, exclude_t<Exclude...>> {
     using underlying_type = base_type::entity_type;
 
     template<typename Type>
-    static constexpr std::size_t index_of = type_list_index_v<stl::remove_const_t<Type>, type_list<typename Owned::element_type..., typename Get::element_type..., typename Exclude::element_type...>>;
+    static constexpr stl::size_t index_of = type_list_index_v<stl::remove_const_t<Type>, type_list<typename Owned::element_type..., typename Get::element_type..., typename Exclude::element_type...>>;
 
-    template<std::size_t... Index, std::size_t... Other>
+    template<stl::size_t... Index, stl::size_t... Other>
     [[nodiscard]] auto pools_for(std::index_sequence<Index...>, std::index_sequence<Other...>) const noexcept {
         using return_type = stl::tuple<Owned *..., Get *...>;
         return descriptor ? return_type{static_cast<Owned *>(descriptor->template storage<Index>())..., static_cast<Get *>(descriptor->template storage<sizeof...(Owned) + Other>())...} : return_type{};
@@ -703,7 +703,7 @@ public:
     /*! @brief Underlying entity identifier. */
     using entity_type = underlying_type;
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Signed integer type. */
     using difference_type = std::ptrdiff_t;
     /*! @brief Common type among all storage types. */
@@ -759,7 +759,7 @@ public:
      * @tparam Index Index of the storage to return.
      * @return The storage for the given index.
      */
-    template<std::size_t Index>
+    template<stl::size_t Index>
     [[nodiscard]] auto *storage() const noexcept {
         using type = type_list_element_t<Index, type_list<Owned..., Get..., Exclude...>>;
         return *this ? static_cast<type *>(descriptor->template storage<Index>()) : nullptr;
@@ -897,7 +897,7 @@ public:
      * @param entt A valid identifier.
      * @return The elements assigned to the entity.
      */
-    template<std::size_t... Index>
+    template<stl::size_t... Index>
     [[nodiscard]] decltype(auto) get(const entity_type entt) const {
         const auto cpools = pools_for(std::index_sequence_for<Owned...>{}, std::index_sequence_for<Get...>{});
 
@@ -1013,7 +1013,7 @@ public:
      * @param algo A valid sort function object.
      * @param args Arguments to forward to the sort function object, if any.
      */
-    template<std::size_t... Index, typename Compare, typename Sort = std_sort, typename... Args>
+    template<stl::size_t... Index, typename Compare, typename Sort = std_sort, typename... Args>
     void sort(Compare compare, Sort algo = Sort{}, Args &&...args) const {
         const auto cpools = pools_for(std::index_sequence_for<Owned...>{}, std::index_sequence_for<Get...>{});
 

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

@@ -103,7 +103,7 @@ public:
     /*! @brief Underlying version type. */
     using version_type = traits_type::version_type;
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Iterable handle type. */
     using iterable = iterable_adaptor<internal::handle_storage_iterator<typename decltype(stl::declval<registry_type>().storage())::iterator>>;
 

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

@@ -129,7 +129,7 @@ basic_storage<Args...>::entity_type to_entity(const basic_storage<Args...> &stor
     const auto *page = storage.raw();
 
     // NOLINTBEGIN(cppcoreguidelines-pro-bounds-pointer-arithmetic)
-    for(std::size_t pos{}, count = storage.size(); pos < count; pos += traits_type::page_size, ++page) {
+    for(stl::size_t pos{}, count = storage.size(); pos < count; pos += traits_type::page_size, ++page) {
         if(const auto dist = (std::addressof(instance) - *page); dist >= 0 && dist < static_cast<decltype(dist)>(traits_type::page_size)) {
             return *(static_cast<const basic_storage<Args...>::base_type &>(storage).rbegin() + static_cast<decltype(dist)>(pos) + dist);
         }

+ 19 - 19
src/entt/entity/organizer.hpp

@@ -120,11 +120,11 @@ template<typename Registry>
 class basic_organizer final {
     using callback_type = void(const void *, Registry &);
     using prepare_type = void(Registry &);
-    using dependency_type = std::size_t(const bool, const type_info **, const std::size_t);
+    using dependency_type = stl::size_t(const bool, const type_info **, const stl::size_t);
 
     struct vertex_data final {
-        std::size_t ro_count{};
-        std::size_t rw_count{};
+        stl::size_t ro_count{};
+        stl::size_t rw_count{};
         const char *name{};
         const void *payload{};
         callback_type *callback{};
@@ -152,7 +152,7 @@ class basic_organizer final {
     }
 
     template<typename... Type>
-    [[nodiscard]] static std::size_t fill_dependencies(type_list<Type...>, [[maybe_unused]] const type_info **buffer, [[maybe_unused]] const std::size_t count) {
+    [[nodiscard]] static stl::size_t fill_dependencies(type_list<Type...>, [[maybe_unused]] const type_info **buffer, [[maybe_unused]] const stl::size_t count) {
         if constexpr(sizeof...(Type) == 0u) {
             return {};
         } else {
@@ -160,7 +160,7 @@ class basic_organizer final {
             const type_info *info[]{&type_id<Type>()...};
             const auto length = count < sizeof...(Type) ? count : sizeof...(Type);
 
-            for(std::size_t pos{}; pos < length; ++pos) {
+            for(stl::size_t pos{}; pos < length; ++pos) {
                 // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
                 buffer[pos] = info[pos];
             }
@@ -170,7 +170,7 @@ class basic_organizer final {
     }
 
     template<typename... RO, typename... RW>
-    void track_dependencies(std::size_t index, const bool sync_point, type_list<RO...>, type_list<RW...>) {
+    void track_dependencies(stl::size_t index, const bool sync_point, type_list<RO...>, type_list<RW...>) {
         builder.bind(static_cast<id_type>(index));
         builder.set(type_hash<Registry>::value(), sync_point || (sizeof...(RO) + sizeof...(RW) == 0u));
         (builder.ro(type_hash<RO>::value()), ...);
@@ -183,7 +183,7 @@ public:
     /*! @brief Underlying entity identifier. */
     using entity_type = registry_type::entity_type;
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Raw task function type. */
     using function_type = callback_type;
 
@@ -195,7 +195,7 @@ public:
          * @param from List of in-edges of the vertex.
          * @param to List of out-edges of the vertex.
          */
-        vertex(vertex_data data, stl::vector<std::size_t> from, stl::vector<std::size_t> to)
+        vertex(vertex_data data, stl::vector<stl::size_t> from, stl::vector<stl::size_t> to)
             : node{stl::move(data)},
               in{stl::move(from)},
               out{stl::move(to)} {}
@@ -207,7 +207,7 @@ public:
          * @param length The length of the user-supplied buffer.
          * @return The number of type info objects written to the buffer.
          */
-        [[nodiscard]] size_type ro_dependency(const type_info **buffer, const std::size_t length) const noexcept {
+        [[nodiscard]] size_type ro_dependency(const type_info **buffer, const stl::size_t length) const noexcept {
             return node.dependency(false, buffer, length);
         }
 
@@ -218,7 +218,7 @@ public:
          * @param length The length of the user-supplied buffer.
          * @return The number of type info objects written to the buffer.
          */
-        [[nodiscard]] size_type rw_dependency(const type_info **buffer, const std::size_t length) const noexcept {
+        [[nodiscard]] size_type rw_dependency(const type_info **buffer, const stl::size_t length) const noexcept {
             return node.dependency(true, buffer, length);
         }
 
@@ -282,7 +282,7 @@ public:
          * @brief Returns the list of in-edges of a vertex.
          * @return The list of in-edges of a vertex.
          */
-        [[nodiscard]] const stl::vector<std::size_t> &in_edges() const noexcept {
+        [[nodiscard]] const stl::vector<stl::size_t> &in_edges() const noexcept {
             return in;
         }
 
@@ -290,7 +290,7 @@ public:
          * @brief Returns the list of out-edges of a vertex.
          * @return The list of out-edges of a vertex.
          */
-        [[nodiscard]] const stl::vector<std::size_t> &out_edges() const noexcept {
+        [[nodiscard]] const stl::vector<stl::size_t> &out_edges() const noexcept {
             return out;
         }
 
@@ -305,8 +305,8 @@ public:
 
     private:
         vertex_data node;
-        stl::vector<std::size_t> in;
-        stl::vector<std::size_t> out;
+        stl::vector<stl::size_t> in;
+        stl::vector<stl::size_t> out;
     };
 
     /**
@@ -329,7 +329,7 @@ public:
             name,
             nullptr,
             callback,
-            +[](const bool rw, const type_info **buffer, const std::size_t length) { return rw ? fill_dependencies(typename resource_type::rw{}, buffer, length) : fill_dependencies(typename resource_type::ro{}, buffer, length); },
+            +[](const bool rw, const type_info **buffer, const stl::size_t length) { return rw ? fill_dependencies(typename resource_type::rw{}, buffer, length) : fill_dependencies(typename resource_type::ro{}, buffer, length); },
             +[](registry_type &reg) { void(to_args(reg, typename resource_type::args{})); },
             &type_id<std::integral_constant<decltype(Candidate), Candidate>>()};
 
@@ -361,7 +361,7 @@ public:
             name,
             &value_or_instance,
             callback,
-            +[](const bool rw, const type_info **buffer, const std::size_t length) { return rw ? fill_dependencies(typename resource_type::rw{}, buffer, length) : fill_dependencies(typename resource_type::ro{}, buffer, length); },
+            +[](const bool rw, const type_info **buffer, const stl::size_t length) { return rw ? fill_dependencies(typename resource_type::rw{}, buffer, length) : fill_dependencies(typename resource_type::ro{}, buffer, length); },
             +[](registry_type &reg) { void(to_args(reg, typename resource_type::args{})); },
             &type_id<std::integral_constant<decltype(Candidate), Candidate>>()};
 
@@ -388,7 +388,7 @@ public:
             name,
             payload,
             func,
-            +[](const bool rw, const type_info **buffer, const std::size_t length) { return rw ? fill_dependencies(typename resource_type::rw{}, buffer, length) : fill_dependencies(typename resource_type::ro{}, buffer, length); },
+            +[](const bool rw, const type_info **buffer, const stl::size_t length) { return rw ? fill_dependencies(typename resource_type::rw{}, buffer, length) : fill_dependencies(typename resource_type::ro{}, buffer, length); },
             nullptr,
             &type_id<void>()};
 
@@ -404,8 +404,8 @@ public:
         adjacency_list.reserve(vertices.size());
 
         for(auto adjacency_matrix = builder.graph(); auto curr: adjacency_matrix.vertices()) {
-            stl::vector<std::size_t> in{};
-            stl::vector<std::size_t> out{};
+            stl::vector<stl::size_t> in{};
+            stl::vector<stl::size_t> out{};
 
             for(auto &&edge: adjacency_matrix.in_edges(curr)) {
                 in.push_back(edge.first);

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

@@ -270,7 +270,7 @@ public:
     /*! @brief Underlying version type. */
     using version_type = traits_type::version_type;
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Common type among all storage types. */
     using common_type = base_type;
     /*! @brief Context type. */

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

@@ -133,7 +133,7 @@ public:
     /*! @brief Underlying entity identifier. */
     using entity_type = Type::entity_type;
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Signed integer type. */
     using difference_type = std::ptrdiff_t;
     /*! @brief Common type among all storage types. */

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

@@ -422,12 +422,12 @@ public:
             storage.reserve(length);
             archive(in_use);
 
-            for(std::size_t pos{}; pos < in_use; ++pos) {
+            for(stl::size_t pos{}; pos < in_use; ++pos) {
                 archive(entt);
                 restore(entt);
             }
 
-            for(std::size_t pos = in_use; pos < length; ++pos) {
+            for(stl::size_t pos = in_use; pos < length; ++pos) {
                 archive(entt);
 
                 if(const auto entity = to_entity(entt); remloc.contains(entity)) {

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

@@ -143,10 +143,10 @@ class basic_sparse_set {
     using packed_container_type = stl::vector<Entity, Allocator>;
     using traits_type = entt_traits<Entity>;
 
-    static constexpr auto max_size = static_cast<std::size_t>(traits_type::to_entity(null));
+    static constexpr auto max_size = static_cast<stl::size_t>(traits_type::to_entity(null));
 
     // it could be auto but gcc complains and emits a warning due to a false positive
-    [[nodiscard]] std::size_t policy_to_head() const noexcept {
+    [[nodiscard]] stl::size_t policy_to_head() const noexcept {
         return static_cast<size_type>(max_size * static_cast<stl::remove_const_t<decltype(max_size)>>(mode != deletion_policy::swap_only));
     }
 
@@ -154,7 +154,7 @@ class basic_sparse_set {
         return static_cast<size_type>(traits_type::to_entity(entt));
     }
 
-    [[nodiscard]] auto pos_to_page(const std::size_t pos) const noexcept {
+    [[nodiscard]] auto pos_to_page(const stl::size_t pos) const noexcept {
         return static_cast<size_type>(pos / traits_type::page_size);
     }
 
@@ -202,7 +202,7 @@ class basic_sparse_set {
         }
     }
 
-    void swap_at(const std::size_t lhs, const std::size_t rhs) {
+    void swap_at(const stl::size_t lhs, const stl::size_t rhs) {
         auto &from = packed[lhs];
         auto &to = packed[rhs];
 
@@ -213,11 +213,11 @@ class basic_sparse_set {
     }
 
 private:
-    [[nodiscard]] virtual const void *get_at(const std::size_t) const {
+    [[nodiscard]] virtual const void *get_at(const stl::size_t) const {
         return nullptr;
     }
 
-    virtual void swap_or_move([[maybe_unused]] const std::size_t lhs, [[maybe_unused]] const std::size_t rhs) {
+    virtual void swap_or_move([[maybe_unused]] const stl::size_t lhs, [[maybe_unused]] const stl::size_t rhs) {
         ENTT_ASSERT((mode != deletion_policy::swap_only) || ((lhs < head) == (rhs < head)), "Cross swapping is not supported");
     }
 
@@ -361,7 +361,7 @@ public:
     /*! @brief Underlying version type. */
     using version_type = traits_type::version_type;
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Signed integer type. */
     using difference_type = std::ptrdiff_t;
     /*! @brief Pointer type to contained entities. */

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

@@ -95,7 +95,7 @@ public:
 
     [[nodiscard]] constexpr reference operator[](const difference_type value) const noexcept {
         const auto pos = static_cast<Container::size_type>(index() - value);
-        return (*payload)[pos / Page][fast_mod(static_cast<std::size_t>(pos), Page)];
+        return (*payload)[pos / Page][fast_mod(static_cast<stl::size_t>(pos), Page)];
     }
 
     [[nodiscard]] constexpr pointer operator->() const noexcept {
@@ -214,11 +214,11 @@ class basic_storage: public basic_sparse_set<Entity, typename std::allocator_tra
     using underlying_iterator = underlying_type::basic_iterator;
     using traits_type = component_traits<Type, Entity>;
 
-    [[nodiscard]] auto &element_at(const std::size_t pos) const {
+    [[nodiscard]] auto &element_at(const stl::size_t pos) const {
         return payload[pos / traits_type::page_size][fast_mod(pos, traits_type::page_size)];
     }
 
-    auto assure_at_least(const std::size_t pos) {
+    auto assure_at_least(const stl::size_t pos) {
         const auto idx = pos / traits_type::page_size;
 
         if(!(idx < payload.size())) {
@@ -256,7 +256,7 @@ class basic_storage: public basic_sparse_set<Entity, typename std::allocator_tra
         return it;
     }
 
-    void shrink_to_size(const std::size_t sz) {
+    void shrink_to_size(const stl::size_t sz) {
         const auto from = (sz + traits_type::page_size - 1u) / traits_type::page_size;
         allocator_type allocator{get_allocator()};
 
@@ -280,12 +280,12 @@ class basic_storage: public basic_sparse_set<Entity, typename std::allocator_tra
         payload.shrink_to_fit();
     }
 
-    void swap_at(const std::size_t lhs, const std::size_t rhs) {
+    void swap_at(const stl::size_t lhs, const stl::size_t rhs) {
         using std::swap;
         swap(element_at(lhs), element_at(rhs));
     }
 
-    void move_to(const std::size_t lhs, const std::size_t rhs) {
+    void move_to(const stl::size_t lhs, const stl::size_t rhs) {
         auto &elem = element_at(lhs);
         allocator_type allocator{get_allocator()};
         entt::uninitialized_construct_using_allocator(stl::to_address(assure_at_least(rhs)), allocator, stl::move(elem));
@@ -293,11 +293,11 @@ class basic_storage: public basic_sparse_set<Entity, typename std::allocator_tra
     }
 
 private:
-    [[nodiscard]] const void *get_at(const std::size_t pos) const final {
+    [[nodiscard]] const void *get_at(const stl::size_t pos) const final {
         return std::addressof(element_at(pos));
     }
 
-    void swap_or_move([[maybe_unused]] const std::size_t from, [[maybe_unused]] const std::size_t to) override {
+    void swap_or_move([[maybe_unused]] const stl::size_t from, [[maybe_unused]] const stl::size_t to) override {
         static constexpr bool is_pinned_type = !(std::is_move_constructible_v<Type> && stl::is_move_assignable_v<Type>);
         // use a runtime value to avoid compile-time suppression that drives the code coverage tool crazy
         ENTT_ASSERT((from + 1u) && !is_pinned_type, "Pinned type");
@@ -394,7 +394,7 @@ public:
     /*! @brief Underlying entity identifier. */
     using entity_type = Entity;
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Signed integer type. */
     using difference_type = std::ptrdiff_t;
     /*! @brief Pointer type to contained elements. */
@@ -792,7 +792,7 @@ public:
     /*! @brief Underlying entity identifier. */
     using entity_type = Entity;
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Signed integer type. */
     using difference_type = std::ptrdiff_t;
     /*! @brief Extended iterable storage proxy. */
@@ -1008,7 +1008,7 @@ public:
     /*! @brief Underlying entity identifier. */
     using entity_type = Entity;
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Signed integer type. */
     using difference_type = std::ptrdiff_t;
     /*! @brief Extended iterable storage proxy. */

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

@@ -46,7 +46,7 @@ template<typename It>
     return first == last;
 }
 
-template<typename Result, typename View, typename Other, std::size_t... GLhs, std::size_t... ELhs, std::size_t... GRhs, std::size_t... ERhs>
+template<typename Result, typename View, typename Other, stl::size_t... GLhs, stl::size_t... ELhs, stl::size_t... GRhs, stl::size_t... ERhs>
 [[nodiscard]] Result view_pack(const View &view, const Other &other, std::index_sequence<GLhs...>, std::index_sequence<ELhs...>, std::index_sequence<GRhs...>, std::index_sequence<ERhs...>) {
     Result elem{};
     // friend-initialization, avoid multiple calls to refresh
@@ -57,7 +57,7 @@ template<typename Result, typename View, typename Other, std::size_t... GLhs, st
     return elem;
 }
 
-template<typename Type, bool Checked, std::size_t Get, std::size_t Exclude>
+template<typename Type, bool Checked, stl::size_t Get, stl::size_t Exclude>
 class view_iterator final {
     template<typename, typename...>
     friend struct extended_view_iterator;
@@ -88,7 +88,7 @@ public:
           filter{},
           index{} {}
 
-    view_iterator(iterator_type first, stl::array<const Type *, Get> value, stl::array<const Type *, Exclude> excl, const std::size_t idx) noexcept
+    view_iterator(iterator_type first, stl::array<const Type *, Get> value, stl::array<const Type *, Exclude> excl, const stl::size_t idx) noexcept
         : it{first},
           pools{value},
           filter{excl},
@@ -208,9 +208,9 @@ class basic_view;
  * @tparam Get Number of storage iterated by the view.
  * @tparam Exclude Number of storage used to filter the view.
  */
-template<cvref_unqualified Type, bool Checked, std::size_t Get, std::size_t Exclude>
+template<cvref_unqualified Type, bool Checked, stl::size_t Get, stl::size_t Exclude>
 class basic_common_view {
-    template<typename Return, typename View, typename Other, std::size_t... GLhs, std::size_t... ELhs, std::size_t... GRhs, std::size_t... ERhs>
+    template<typename Return, typename View, typename Other, stl::size_t... GLhs, stl::size_t... ELhs, stl::size_t... GRhs, stl::size_t... ERhs>
     friend Return internal::view_pack(const View &, const Other &, std::index_sequence<GLhs...>, std::index_sequence<ELhs...>, std::index_sequence<GRhs...>, std::index_sequence<ERhs...>);
 
     [[nodiscard]] auto offset() const noexcept {
@@ -245,21 +245,21 @@ protected:
         unchecked_refresh();
     }
 
-    [[nodiscard]] const Type *pool_at(const std::size_t pos) const noexcept {
+    [[nodiscard]] const Type *pool_at(const stl::size_t pos) const noexcept {
         return pools[pos];
     }
 
-    void pool_at(const std::size_t pos, const Type *elem) noexcept {
+    void pool_at(const stl::size_t pos, const Type *elem) noexcept {
         ENTT_ASSERT(elem != nullptr, "Unexpected element");
         pools[pos] = elem;
         refresh();
     }
 
-    [[nodiscard]] const Type *filter_at(const std::size_t pos) const noexcept {
+    [[nodiscard]] const Type *filter_at(const stl::size_t pos) const noexcept {
         return (filter[pos] == placeholder) ? nullptr : filter[pos];
     }
 
-    void filter_at(const std::size_t pos, const Type *elem) noexcept {
+    void filter_at(const stl::size_t pos, const Type *elem) noexcept {
         ENTT_ASSERT(elem != nullptr, "Unexpected element");
         filter[pos] = elem;
     }
@@ -268,7 +268,7 @@ protected:
         return internal::none_of(filter.begin(), filter.end(), entt);
     }
 
-    void use(const std::size_t pos) noexcept {
+    void use(const stl::size_t pos) noexcept {
         index = (index != Get) ? pos : Get;
     }
     /*! @endcond */
@@ -279,7 +279,7 @@ public:
     /*! @brief Underlying entity identifier. */
     using entity_type = Type::entity_type;
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Signed integer type. */
     using difference_type = std::ptrdiff_t;
     /*! @brief Forward iterator type. */
@@ -411,13 +411,13 @@ class basic_view<get_t<Get...>, exclude_t<Exclude...>>
     : public basic_common_view<stl::common_type_t<typename Get::base_type...>, internal::tombstone_check_v<Get...>, sizeof...(Get), sizeof...(Exclude)> {
     using base_type = basic_common_view<stl::common_type_t<typename Get::base_type...>, internal::tombstone_check_v<Get...>, sizeof...(Get), sizeof...(Exclude)>;
 
-    template<std::size_t Index>
+    template<stl::size_t Index>
     using element_at = type_list_element_t<Index, type_list<Get..., Exclude...>>;
 
     template<typename Type>
-    static constexpr std::size_t index_of = type_list_index_v<stl::remove_const_t<Type>, type_list<typename Get::element_type..., typename Exclude::element_type...>>;
+    static constexpr stl::size_t index_of = type_list_index_v<stl::remove_const_t<Type>, type_list<typename Get::element_type..., typename Exclude::element_type...>>;
 
-    template<std::size_t Curr, std::size_t Other, typename... Args>
+    template<stl::size_t Curr, stl::size_t Other, typename... Args>
     [[nodiscard]] auto dispatch_get(const stl::tuple<typename base_type::entity_type, Args...> &curr) const {
         if constexpr(Curr == Other) {
             return stl::forward_as_tuple(std::get<Args>(curr)...);
@@ -426,7 +426,7 @@ class basic_view<get_t<Get...>, exclude_t<Exclude...>>
         }
     }
 
-    template<std::size_t Curr, typename Func, std::size_t... Index>
+    template<stl::size_t Curr, typename Func, stl::size_t... Index>
     void each(Func func, std::index_sequence<Index...>) const {
         for(const auto curr: storage<Curr>()->each()) {
             if(const auto entt = std::get<0>(curr); (!internal::tombstone_check_v<Get...> || (entt != tombstone)) && ((Curr == Index || base_type::pool_at(Index)->contains(entt)) && ...) && base_type::none_of(entt)) {
@@ -507,7 +507,7 @@ public:
      * @brief Forces a view to use a given element to drive iterations
      * @tparam Index Index of the element to use to drive iterations.
      */
-    template<std::size_t Index>
+    template<stl::size_t Index>
     void use() noexcept {
         base_type::use(Index);
     }
@@ -527,7 +527,7 @@ public:
      * @tparam Index Index of the storage to return.
      * @return The storage for the given index.
      */
-    template<std::size_t Index>
+    template<stl::size_t Index>
     [[nodiscard]] auto *storage() const noexcept {
         if constexpr(Index < sizeof...(Get)) {
             return static_cast<element_at<Index> *>(const_cast<constness_as_t<common_type, element_at<Index>> *>(base_type::pool_at(Index)));
@@ -552,7 +552,7 @@ public:
      * @tparam Type Type of storage to assign to the view.
      * @param elem A storage to assign to the view.
      */
-    template<std::size_t Index, typename Type>
+    template<stl::size_t Index, typename Type>
     void storage(Type &elem) noexcept {
         static_assert(stl::is_convertible_v<Type &, element_at<Index> &>, "Unexpected type");
 
@@ -590,7 +590,7 @@ public:
      * @param entt A valid identifier.
      * @return The elements assigned to the entity.
      */
-    template<std::size_t... Index>
+    template<stl::size_t... Index>
     [[nodiscard]] decltype(auto) get(const entity_type entt) const {
         if constexpr(sizeof...(Index) == 0) {
             return [this, entt]<auto... Idx>(std::index_sequence<Idx...>) {
@@ -689,7 +689,7 @@ public:
     /*! @brief Underlying entity identifier. */
     using entity_type = common_type::entity_type;
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Signed integer type. */
     using difference_type = std::ptrdiff_t;
     /*! @brief Random access iterator type. */
@@ -967,7 +967,7 @@ public:
      * @tparam Index Index of the storage to return.
      * @return The storage for the given index.
      */
-    template<std::size_t Index>
+    template<stl::size_t Index>
     [[nodiscard]] auto *storage() const noexcept {
         static_assert(Index == 0u, "Index out of bounds");
         return static_cast<Get *>(const_cast<constness_as_t<common_type, Get> *>(base_type::handle()));
@@ -986,7 +986,7 @@ public:
      * @tparam Index Index of the storage to assign to the view.
      * @param elem A storage to assign to the view.
      */
-    template<std::size_t Index>
+    template<stl::size_t Index>
     void storage(Get &elem) noexcept {
         static_assert(Index == 0u, "Index out of bounds");
         *this = basic_view{elem};
@@ -1027,7 +1027,7 @@ public:
      * @param entt A valid identifier.
      * @return The element assigned to the entity.
      */
-    template<std::size_t... Index>
+    template<stl::size_t... Index>
     [[nodiscard]] decltype(auto) get(const entity_type entt) const {
         if constexpr(sizeof...(Index) == 0) {
             return storage()->get_as_tuple(entt);

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

@@ -19,7 +19,7 @@ namespace internal {
 
 template<typename It>
 class edge_iterator {
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
 
     void find_next() noexcept {
         for(; pos != last && !it[static_cast<It::difference_type>(pos)]; pos += offset) {}
@@ -87,14 +87,14 @@ private:
 template<std::derived_from<directed_tag> Category, typename Allocator>
 class adjacency_matrix {
     using alloc_traits = std::allocator_traits<Allocator>;
-    static_assert(stl::is_same_v<typename alloc_traits::value_type, std::size_t>, "Invalid value type");
-    using container_type = stl::vector<std::size_t, typename alloc_traits::template rebind_alloc<std::size_t>>;
+    static_assert(stl::is_same_v<typename alloc_traits::value_type, stl::size_t>, "Invalid value type");
+    using container_type = stl::vector<stl::size_t, typename alloc_traits::template rebind_alloc<stl::size_t>>;
 
 public:
     /*! @brief Allocator type. */
     using allocator_type = Allocator;
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Vertex type. */
     using vertex_type = size_type;
     /*! @brief Edge type. */

+ 10 - 10
src/entt/graph/flow.hpp

@@ -31,9 +31,9 @@ class basic_flow {
     using alloc_traits = std::allocator_traits<Allocator>;
     static_assert(stl::is_same_v<typename alloc_traits::value_type, id_type>, "Invalid value type");
     using task_container_type = dense_set<id_type, stl::identity, std::equal_to<>, typename alloc_traits::template rebind_alloc<id_type>>;
-    using ro_rw_container_type = stl::vector<stl::pair<std::size_t, bool>, typename alloc_traits::template rebind_alloc<stl::pair<std::size_t, bool>>>;
+    using ro_rw_container_type = stl::vector<stl::pair<stl::size_t, bool>, typename alloc_traits::template rebind_alloc<stl::pair<stl::size_t, bool>>>;
     using deps_container_type = dense_map<id_type, ro_rw_container_type, stl::identity, std::equal_to<>, typename alloc_traits::template rebind_alloc<stl::pair<const id_type, ro_rw_container_type>>>;
-    using adjacency_matrix_type = adjacency_matrix<directed_tag, typename alloc_traits::template rebind_alloc<std::size_t>>;
+    using adjacency_matrix_type = adjacency_matrix<directed_tag, typename alloc_traits::template rebind_alloc<stl::size_t>>;
 
     void emplace(const id_type res, const bool is_rw) {
         ENTT_ASSERT(index.first() < vertices.size(), "Invalid node");
@@ -84,9 +84,9 @@ class basic_flow {
     void transitive_closure(adjacency_matrix_type &matrix) const {
         const auto length = matrix.size();
 
-        for(std::size_t vk{}; vk < length; ++vk) {
-            for(std::size_t vi{}; vi < length; ++vi) {
-                for(std::size_t vj{}; vj < length; ++vj) {
+        for(stl::size_t vk{}; vk < length; ++vk) {
+            for(stl::size_t vi{}; vi < length; ++vi) {
+                for(stl::size_t vj{}; vj < length; ++vj) {
                     if(matrix.contains(vi, vk) && matrix.contains(vk, vj)) {
                         matrix.insert(vi, vj);
                     }
@@ -98,14 +98,14 @@ class basic_flow {
     void transitive_reduction(adjacency_matrix_type &matrix) const {
         const auto length = matrix.size();
 
-        for(std::size_t vert{}; vert < length; ++vert) {
+        for(stl::size_t vert{}; vert < length; ++vert) {
             matrix.erase(vert, vert);
         }
 
-        for(std::size_t vj{}; vj < length; ++vj) {
-            for(std::size_t vi{}; vi < length; ++vi) {
+        for(stl::size_t vj{}; vj < length; ++vj) {
+            for(stl::size_t vi{}; vi < length; ++vi) {
                 if(matrix.contains(vi, vj)) {
-                    for(std::size_t vk{}; vk < length; ++vk) {
+                    for(stl::size_t vk{}; vk < length; ++vk) {
                         if(matrix.contains(vj, vk)) {
                             matrix.erase(vi, vk);
                         }
@@ -119,7 +119,7 @@ public:
     /*! @brief Allocator type. */
     using allocator_type = Allocator;
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Iterable task list. */
     using iterable = iterable_adaptor<typename task_container_type::const_iterator>;
     /*! @brief Adjacency matrix type. */

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

@@ -14,7 +14,7 @@ struct directed_tag {};
 /*! @brief Directed graph category tag. */
 struct undirected_tag: directed_tag {};
 
-template<std::derived_from<directed_tag>, typename = std::allocator<std::size_t>>
+template<std::derived_from<directed_tag>, typename = std::allocator<stl::size_t>>
 class adjacency_matrix;
 
 template<typename = std::allocator<id_type>>

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

@@ -28,7 +28,7 @@ requires is_complete_v<stl::tuple_size<Type>>
 struct sequence_container_extent<Type>: integral_constant<stl::tuple_size_v<Type>> {};
 
 template<typename Type>
-inline constexpr std::size_t sequence_container_extent_v = sequence_container_extent<Type>::value;
+inline constexpr stl::size_t sequence_container_extent_v = sequence_container_extent<Type>::value;
 
 template<typename Type>
 concept meta_sequence_container_like = requires(Type elem) {
@@ -67,7 +67,7 @@ struct basic_meta_sequence_container_traits {
     using iterator = meta_sequence_container::iterator;
 
     /*! @brief Number of elements, or `meta_dynamic_extent` if dynamic. */
-    static constexpr std::size_t extent = internal::sequence_container_extent_v<Type>;
+    static constexpr stl::size_t extent = internal::sequence_container_extent_v<Type>;
 
     /**
      * @brief Returns the number of elements in a container.

+ 1 - 1
src/entt/meta/factory.hpp

@@ -456,7 +456,7 @@ public:
                     internal::meta_traits::is_none,
                     1u,
                     &internal::resolve<stl::remove_cvref_t<typename descriptor::return_type>>,
-                    &meta_arg<type_list<type_list_element_t<static_cast<std::size_t>(args_type::size != 1u), args_type>>>,
+                    &meta_arg<type_list<type_list_element_t<static_cast<stl::size_t>(args_type::size != 1u), args_type>>>,
                     &meta_setter<Type, Setter>,
                     &meta_getter<Type, Getter, Policy>});
         }

+ 1 - 1
src/entt/meta/fwd.hpp

@@ -30,7 +30,7 @@ template<typename>
 class meta_factory;
 
 /*! @brief Used to identicate that a sequence container has not a fixed size. */
-inline constexpr std::size_t meta_dynamic_extent = (std::numeric_limits<std::size_t>::max)();
+inline constexpr stl::size_t meta_dynamic_extent = (std::numeric_limits<stl::size_t>::max)();
 
 } // namespace entt
 

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

@@ -50,7 +50,7 @@ class meta_sequence_container {
 
 public:
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Meta iterator type. */
     using iterator = meta_iterator;
 
@@ -111,7 +111,7 @@ class meta_associative_container {
 
 public:
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Meta iterator type. */
     using iterator = meta_iterator;
 

+ 7 - 7
src/entt/meta/node.hpp

@@ -78,7 +78,7 @@ struct meta_conv_node {
 };
 
 struct meta_ctor_node {
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
 
     id_type id{};
     size_type arity{0u};
@@ -87,7 +87,7 @@ struct meta_ctor_node {
 };
 
 struct meta_data_node {
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
 
     id_type id{};
     const char *name{};
@@ -101,7 +101,7 @@ struct meta_data_node {
 };
 
 struct meta_func_node {
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
 
     id_type id{};
     const char *name{};
@@ -115,7 +115,7 @@ struct meta_func_node {
 };
 
 struct meta_template_node {
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
 
     size_type arity{0u};
     const meta_type_node &(*resolve)(const meta_context &) noexcept {};
@@ -131,7 +131,7 @@ struct meta_type_descriptor {
 };
 
 struct meta_type_node {
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
 
     const type_info *info{};
     id_type id{};
@@ -188,7 +188,7 @@ template<cvref_unqualified Type>
 const meta_type_node &resolve(const meta_context &) noexcept;
 
 template<typename... Args>
-[[nodiscard]] const meta_type_node &meta_arg_node(const meta_context &context, type_list<Args...>, const std::size_t index) noexcept {
+[[nodiscard]] const meta_type_node &meta_arg_node(const meta_context &context, type_list<Args...>, const stl::size_t index) noexcept {
     using resolve_type = const meta_type_node &(*)(const meta_context &) noexcept;
     constexpr stl::array<resolve_type, sizeof...(Args)> list{&resolve<stl::remove_cvref_t<Args>>...};
     ENTT_ASSERT(index < sizeof...(Args), "Out of bounds");
@@ -263,7 +263,7 @@ auto setup_node_for() noexcept {
         node.templ = meta_template_node{
             meta_template_traits<Type>::args_type::size,
             &resolve<typename meta_template_traits<Type>::class_type>,
-            +[](const meta_context &area, const std::size_t index) noexcept -> decltype(auto) { return meta_arg_node(area, typename meta_template_traits<Type>::args_type{}, index); }};
+            +[](const meta_context &area, const stl::size_t index) noexcept -> decltype(auto) { return meta_arg_node(area, typename meta_template_traits<Type>::args_type{}, index); }};
     }
 
     return node;

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

@@ -204,7 +204,7 @@ template<typename Policy, typename Candidate, typename... Args>
     }
 }
 
-template<typename Type, typename Policy, typename Candidate, std::size_t... Index>
+template<typename Type, typename Policy, typename Candidate, stl::size_t... Index>
 [[nodiscard]] meta_any meta_invoke(meta_any &instance, Candidate &&candidate, [[maybe_unused]] meta_any *const args, std::index_sequence<Index...>) {
     using descriptor = meta_function_helper_t<Type, stl::remove_reference_t<Candidate>>;
 
@@ -227,7 +227,7 @@ template<typename Type, typename Policy, typename Candidate, std::size_t... Inde
     return meta_any{meta_ctx_arg, instance.context()};
 }
 
-template<typename Type, typename... Args, std::size_t... Index>
+template<typename Type, typename... Args, stl::size_t... Index>
 [[nodiscard]] meta_any meta_construct(const meta_ctx &ctx, meta_any *const args, std::index_sequence<Index...>) {
     // NOLINTBEGIN(cppcoreguidelines-pro-bounds-pointer-arithmetic) - waiting for C++20 (and std::span)
     if(((args + Index)->allow_cast<Args>() && ...)) {
@@ -249,7 +249,7 @@ template<typename Type, typename... Args, std::size_t... Index>
  * @return The meta type of the i-th element of the list of arguments.
  */
 template<typename Type>
-[[nodiscard]] meta_type meta_arg(const meta_ctx &ctx, const std::size_t index) noexcept {
+[[nodiscard]] meta_type meta_arg(const meta_ctx &ctx, const stl::size_t index) noexcept {
     const auto &context = internal::meta_context::from(ctx);
     return {ctx, internal::meta_arg_node(context, Type{}, index)};
 }
@@ -261,7 +261,7 @@ template<typename Type>
  * @return The meta type of the i-th element of the list of arguments.
  */
 template<typename Type>
-[[nodiscard]] meta_type meta_arg(const std::size_t index) noexcept {
+[[nodiscard]] meta_type meta_arg(const stl::size_t index) noexcept {
     return meta_arg<Type>(locator<meta_ctx>::value_or(), index);
 }
 

+ 1 - 1
src/entt/poly/fwd.hpp

@@ -6,7 +6,7 @@
 namespace entt {
 
 // NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays)
-template<typename, std::size_t Len = sizeof(double[2]), std::size_t = alignof(double[2])>
+template<typename, stl::size_t Len = sizeof(double[2]), stl::size_t = alignof(double[2])>
 class basic_poly;
 
 /**

+ 7 - 7
src/entt/poly/poly.hpp

@@ -31,11 +31,11 @@ struct poly_inspector {
      * @param args The arguments to pass to the function.
      * @return A poly inspector convertible to any type.
      */
-    template<std::size_t Member, typename... Args>
+    template<stl::size_t Member, typename... Args>
     [[nodiscard]] poly_inspector invoke(Args &&...args) const;
 
     /*! @copydoc invoke */
-    template<std::size_t Member, typename... Args>
+    template<stl::size_t Member, typename... Args>
     [[nodiscard]] poly_inspector invoke(Args &&...args);
 };
 
@@ -45,7 +45,7 @@ struct poly_inspector {
  * @tparam Len Size of the storage reserved for the small buffer optimization.
  * @tparam Align Alignment requirement.
  */
-template<typename Concept, std::size_t Len, std::size_t Align>
+template<typename Concept, stl::size_t Len, stl::size_t Align>
 class poly_vtable {
     using inspector = Concept::template type<poly_inspector>;
 
@@ -139,7 +139,7 @@ struct poly_base {
      * @param args The arguments to pass to the function.
      * @return The return value of the invoked function, if any.
      */
-    template<std::size_t Member, typename... Args>
+    template<stl::size_t Member, typename... Args>
     [[nodiscard]] decltype(auto) invoke(const poly_base &self, Args &&...args) const {
         const auto &poly = static_cast<const Poly &>(self);
 
@@ -151,7 +151,7 @@ struct poly_base {
     }
 
     /*! @copydoc invoke */
-    template<std::size_t Member, typename... Args>
+    template<stl::size_t Member, typename... Args>
     [[nodiscard]] decltype(auto) invoke(poly_base &self, Args &&...args) {
         auto &poly = static_cast<Poly &>(self);
 
@@ -173,7 +173,7 @@ struct poly_base {
  * @param args The arguments to pass to the function.
  * @return The return value of the invoked function, if any.
  */
-template<std::size_t Member, typename Poly, typename... Args>
+template<stl::size_t Member, typename Poly, typename... Args>
 decltype(auto) poly_call(Poly &&self, Args &&...args) {
     return stl::forward<Poly>(self).template invoke<Member>(self, stl::forward<Args>(args)...);
 }
@@ -193,7 +193,7 @@ decltype(auto) poly_call(Poly &&self, Args &&...args) {
  * @tparam Len Size of the storage reserved for the small buffer optimization.
  * @tparam Align Optional alignment requirement.
  */
-template<typename Concept, std::size_t Len, std::size_t Align>
+template<typename Concept, stl::size_t Len, stl::size_t Align>
 class basic_poly: private Concept::template type<poly_base<basic_poly<Concept, Len, Align>>> {
     friend struct poly_base<basic_poly>;
 

+ 1 - 1
src/entt/process/scheduler.hpp

@@ -45,7 +45,7 @@ public:
     /*! @brief Allocator type. */
     using allocator_type = Allocator;
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Unsigned integer type. */
     using delta_type = Delta;
 

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

@@ -136,7 +136,7 @@ public:
     /*! @brief Resource type. */
     using value_type = Type;
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Loader type. */
     using loader_type = Loader;
     /*! @brief Input iterator type. */

+ 3 - 3
src/entt/signal/delegate.hpp

@@ -68,7 +68,7 @@ class delegate<Ret(Args...)> {
     using return_type = stl::remove_const_t<Ret>;
     using delegate_type = return_type(const void *, Args...);
 
-    template<auto Candidate, std::size_t... Index>
+    template<auto Candidate, stl::size_t... Index>
     [[nodiscard]] auto wrap(std::index_sequence<Index...>) noexcept {
         return [](const void *, Args... args) -> return_type {
             [[maybe_unused]] const auto arguments = stl::forward_as_tuple(stl::forward<Args>(args)...);
@@ -77,7 +77,7 @@ class delegate<Ret(Args...)> {
         };
     }
 
-    template<auto Candidate, typename Type, std::size_t... Index>
+    template<auto Candidate, typename Type, stl::size_t... Index>
     [[nodiscard]] auto wrap(Type &, std::index_sequence<Index...>) noexcept {
         return [](const void *payload, Args... args) -> return_type {
             Type *curr = static_cast<Type *>(const_cast<constness_as_t<void, Type> *>(payload));
@@ -87,7 +87,7 @@ class delegate<Ret(Args...)> {
         };
     }
 
-    template<auto Candidate, typename Type, std::size_t... Index>
+    template<auto Candidate, typename Type, stl::size_t... Index>
     [[nodiscard]] auto wrap(Type *, std::index_sequence<Index...>) noexcept {
         return [](const void *payload, Args... args) -> return_type {
             Type *curr = static_cast<Type *>(const_cast<constness_as_t<void, Type> *>(payload));

+ 3 - 3
src/entt/signal/dispatcher.hpp

@@ -26,7 +26,7 @@ struct basic_dispatcher_handler {
     virtual void publish() = 0;
     virtual void disconnect(void *) = 0;
     virtual void clear() noexcept = 0;
-    [[nodiscard]] virtual std::size_t size() const noexcept = 0;
+    [[nodiscard]] virtual stl::size_t size() const noexcept = 0;
 };
 
 template<cvref_unqualified Type, typename Allocator>
@@ -76,7 +76,7 @@ public:
         }
     }
 
-    [[nodiscard]] std::size_t size() const noexcept override {
+    [[nodiscard]] stl::size_t size() const noexcept override {
         return events.size();
     }
 
@@ -140,7 +140,7 @@ public:
     /*! @brief Allocator type. */
     using allocator_type = Allocator;
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
 
     /*! @brief Default constructor. */
     basic_dispatcher()

+ 1 - 1
src/entt/signal/emitter.hpp

@@ -45,7 +45,7 @@ public:
     /*! @brief Allocator type. */
     using allocator_type = Allocator;
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
 
     /*! @brief Default constructor. */
     emitter()

+ 1 - 1
src/entt/signal/sigh.hpp

@@ -62,7 +62,7 @@ public:
     /*! @brief Allocator type. */
     using allocator_type = Allocator;
     /*! @brief Unsigned integer type. */
-    using size_type = std::size_t;
+    using size_type = stl::size_t;
     /*! @brief Sink type. */
     using sink_type = sink<sigh<Ret(Args...), Allocator>>;
 

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

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

+ 2 - 0
src/entt/stl/cstdint.hpp

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

+ 3 - 3
src/entt/tools/davey.hpp

@@ -83,7 +83,7 @@ static void present_element(const meta_any &obj, OnEntity on_entity) {
             if(ImGui::TreeNode(label)) {
                 meta_sequence_container view = elem.as_sequence_container();
 
-                for(std::size_t pos{}, last = view.size(); pos < last; ++pos) {
+                for(stl::size_t pos{}, last = view.size(); pos < last; ++pos) {
                     ImGui::PushID(static_cast<int>(pos));
 
                     if(ImGui::TreeNode(label, "%zu", pos)) {
@@ -101,7 +101,7 @@ static void present_element(const meta_any &obj, OnEntity on_entity) {
                 meta_associative_container view = elem.as_associative_container();
                 auto it = view.begin();
 
-                for(std::size_t pos{}, last = view.size(); pos < last; ++pos, ++it) {
+                for(stl::size_t pos{}, last = view.size(); pos < last; ++pos, ++it) {
                     ImGui::PushID(static_cast<int>(pos));
 
                     if(ImGui::TreeNode(label, "%zu", pos)) {
@@ -194,7 +194,7 @@ static void present_entity(const meta_ctx &ctx, const Entity entt, const It from
     }
 }
 
-template<typename... Get, typename... Exclude, std::size_t... Index>
+template<typename... Get, typename... Exclude, stl::size_t... Index>
 static void present_view(const meta_ctx &ctx, const basic_view<get_t<Get...>, exclude_t<Exclude...>> &view, std::index_sequence<Index...>) {
     using view_type = basic_view<get_t<Get...>, exclude_t<Exclude...>>;
     const stl::array<const typename view_type::common_type *, sizeof...(Index)> range{view.template storage<Index>()...};