skypjack 2 дней назад
Родитель
Сommit
5f6b0c2fa1

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

@@ -38,14 +38,14 @@ 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<stl::size_t, 0u> {};
+struct size_of: stl::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<stl::size_t, sizeof(Type)> {};
+    : stl::integral_constant<stl::size_t, sizeof(Type)> {};
 
 /**
  * @brief Helper variable template.
@@ -75,7 +75,7 @@ inline constexpr auto unpack_as_value = Value;
  * @tparam Value A static constant.
  */
 template<auto Value>
-using integral_constant = std::integral_constant<decltype(Value), Value>;
+using integral_constant = stl::integral_constant<decltype(Value), Value>;
 
 /**
  * @brief Alias template to facilitate the creation of named values.
@@ -892,13 +892,13 @@ 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<entt::stl::size_t, entt::type_list<Type...>::size> {};
+struct entt::stl::tuple_size<entt::type_list<Type...>>: entt::stl::integral_constant<entt::stl::size_t, entt::type_list<Type...>::size> {};
 
 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<entt::stl::size_t, entt::value_list<Value...>::size> {};
+struct entt::stl::tuple_size<entt::value_list<Value...>>: entt::stl::integral_constant<entt::stl::size_t, entt::value_list<Value...>::size> {};
 
 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...>> {};

+ 3 - 3
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<stl::size_t, !stl::is_empty_v<ENTT_ETO_TYPE(Type)> * ENTT_PACKED_PAGE> {};
+struct page_size: stl::integral_constant<stl::size_t, !stl::is_empty_v<ENTT_ETO_TYPE(Type)> * ENTT_PACKED_PAGE> {};
 
 template<>
-struct page_size<void>: std::integral_constant<stl::size_t, 0u> {};
+struct page_size<void>: stl::integral_constant<stl::size_t, 0u> {};
 
 template<typename Type>
 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> {};
+struct page_size<Type>: stl::integral_constant<stl::size_t, Type::page_size> {};
 
 } // namespace internal
 /*! @endcond */

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

@@ -331,7 +331,7 @@ public:
             callback,
             +[](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>>()};
+            &type_id<stl::integral_constant<decltype(Candidate), Candidate>>()};
 
         track_dependencies(vertices.size(), resource_type::sync_point, typename resource_type::ro{}, typename resource_type::rw{});
         vertices.push_back(stl::move(vdata));
@@ -363,7 +363,7 @@ public:
             callback,
             +[](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>>()};
+            &type_id<stl::integral_constant<decltype(Candidate), Candidate>>()};
 
         track_dependencies(vertices.size(), resource_type::sync_point, typename resource_type::ro{}, typename resource_type::rw{});
         vertices.push_back(stl::move(vdata));

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

@@ -12,6 +12,7 @@ using std::conditional_t;
 using std::decay_t;
 using std::extent_v;
 using std::false_type;
+using std::integral_constant;
 using std::invoke_result_t;
 using std::is_aggregate_v;
 using std::is_array_v;