skypjack 1 день назад
Родитель
Сommit
98604629c7

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

@@ -132,7 +132,7 @@ class basic_any: private internal::basic_any_storage<Len, Align> {
         vtable = basic_vtable<plain_type>;
         underlying_type = type_hash<plain_type>::value();
 
-        if constexpr(std::is_void_v<Type>) {
+        if constexpr(stl::is_void_v<Type>) {
             deleter = nullptr;
             mode = any_policy::empty;
             this->instance = nullptr;
@@ -206,7 +206,7 @@ public:
      * @param value A pointer to an object to take ownership of.
      */
     template<typename Type>
-    requires (!std::is_const_v<Type> && !std::is_void_v<Type>)
+    requires (!std::is_const_v<Type> && !stl::is_void_v<Type>)
     explicit basic_any(std::in_place_t, Type *value)
         : base_type{} {
         if(value == nullptr) {

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

@@ -674,7 +674,7 @@ struct has_iterator_category<Type>: stl::true_type {};
 
 /*! @copydoc is_iterator */
 template<typename Type>
-requires (!std::is_void_v<std::remove_const_t<stl::remove_pointer_t<Type>>>)
+requires (!stl::is_void_v<std::remove_const_t<stl::remove_pointer_t<Type>>>)
 struct is_iterator<Type>: internal::has_iterator_category<Type> {};
 
 /**

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

@@ -29,7 +29,7 @@ template<typename It, typename... Owned, typename... Get>
 class extended_group_iterator<It, owned_t<Owned...>, get_t<Get...>> {
     template<typename Type>
     [[nodiscard]] auto index_to_element([[maybe_unused]] Type &cpool) const {
-        if constexpr(std::is_void_v<typename Type::value_type>) {
+        if constexpr(stl::is_void_v<typename Type::value_type>) {
             return stl::make_tuple();
         } else {
             return stl::forward_as_tuple(cpool.rbegin()[it.index()]);

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

@@ -1058,7 +1058,7 @@ public:
                 stl::apply(func, pack);
             }
         } else if constexpr(Get::storage_policy == deletion_policy::swap_and_pop || Get::storage_policy == deletion_policy::swap_only) {
-            if constexpr(std::is_void_v<typename Get::value_type>) {
+            if constexpr(stl::is_void_v<typename Get::value_type>) {
                 for(size_type pos = base_type::size(); pos; --pos) {
                     func();
                 }

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

@@ -184,7 +184,7 @@ class meta_any {
 
         if constexpr(is_meta_pointer_like_v<Type>) {
             if(req == internal::meta_traits::is_pointer) {
-                if constexpr(!std::is_void_v<std::remove_const_t<typename std::pointer_traits<Type>::element_type>>) {
+                if constexpr(!stl::is_void_v<std::remove_const_t<typename std::pointer_traits<Type>::element_type>>) {
                     if constexpr(std::is_constructible_v<bool, Type>) {
                         if(const auto &pointer_like = any_cast<const Type &>(value.storage); pointer_like) {
                             static_cast<meta_any *>(other)->emplace<decltype(adl_meta_pointer_like<Type>::dereference(stl::declval<const Type &>()))>(adl_meta_pointer_like<Type>::dereference(pointer_like));
@@ -200,7 +200,7 @@ class meta_any {
                     if(const auto &elem = any_cast<const Type &>(value.storage); elem) {
                         return (value.storage.policy() == any_policy::cref) ? static_cast<meta_any *>(other)->emplace<decltype(*elem)>(*elem) : static_cast<meta_any *>(other)->emplace<decltype(*const_cast<Type &>(elem))>(*const_cast<Type &>(elem));
                     }
-                } else if constexpr(!std::is_array_v<Type> && !std::is_void_v<std::remove_const_t<stl::remove_pointer_t<Type>>>) {
+                } else if constexpr(!std::is_array_v<Type> && !stl::is_void_v<std::remove_const_t<stl::remove_pointer_t<Type>>>) {
                     if(auto *pointer = any_cast<Type>(value.storage); pointer) {
                         static_cast<meta_any *>(other)->emplace<std::conditional_t<std::is_function_v<std::remove_const_t<stl::remove_pointer_t<Type>>>, Type, stl::remove_pointer_t<Type> &>>(*pointer);
                     }

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

@@ -244,7 +244,7 @@ auto setup_node_for() noexcept {
         };
     }
 
-    if constexpr(!std::is_void_v<Type> && !std::is_function_v<Type>) {
+    if constexpr(!stl::is_void_v<Type> && !std::is_function_v<Type>) {
         node.from_void = +[](const meta_ctx &ctx, void *elem, const void *celem) {
             if(elem && celem) { // ownership construction request
                 return meta_any{ctx, std::in_place, static_cast<std::decay_t<Type> *>(elem)};

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

@@ -196,7 +196,7 @@ namespace internal {
 
 template<typename Policy, typename Candidate, typename... Args>
 [[nodiscard]] meta_any meta_invoke_with_args(const meta_ctx &ctx, Candidate &&candidate, Args &&...args) {
-    if constexpr(std::is_void_v<decltype(std::invoke(stl::forward<Candidate>(candidate), args...))>) {
+    if constexpr(stl::is_void_v<decltype(std::invoke(stl::forward<Candidate>(candidate), args...))>) {
         std::invoke(stl::forward<Candidate>(candidate), args...);
         return meta_any{ctx, std::in_place_type<void>};
     } else {

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

@@ -193,7 +193,7 @@ public:
     template<typename Func>
     void collect(Func func, Args... args) const {
         for(auto pos = calls.size(); pos; --pos) {
-            if constexpr(std::is_void_v<Ret> || !std::is_invocable_v<Func, Ret>) {
+            if constexpr(stl::is_void_v<Ret> || !std::is_invocable_v<Func, Ret>) {
                 calls[pos - 1u](args...);
 
                 if constexpr(std::is_invocable_r_v<bool, Func>) {

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

@@ -11,6 +11,7 @@ using std::invoke_result_t;
 using std::is_invocable_r_v;
 using std::is_member_object_pointer_v;
 using std::is_same_v;
+using std::is_void_v;
 using std::remove_cvref_t;
 using std::remove_pointer_t;
 using std::true_type;