Przeglądaj źródła

stl: std::is_constructible_v

skypjack 5 dni temu
rodzic
commit
03299cedad

+ 3 - 3
src/entt/core/memory.hpp

@@ -119,15 +119,15 @@ template<typename Type>
 struct uses_allocator_construction {
 struct uses_allocator_construction {
     template<typename Allocator, typename... Params>
     template<typename Allocator, typename... Params>
     static constexpr auto args([[maybe_unused]] const Allocator &allocator, Params &&...params) noexcept {
     static constexpr auto args([[maybe_unused]] const Allocator &allocator, Params &&...params) noexcept {
-        if constexpr(!std::uses_allocator_v<Type, Allocator> && std::is_constructible_v<Type, Params...>) {
+        if constexpr(!std::uses_allocator_v<Type, Allocator> && stl::is_constructible_v<Type, Params...>) {
             return stl::forward_as_tuple(stl::forward<Params>(params)...);
             return stl::forward_as_tuple(stl::forward<Params>(params)...);
         } else {
         } else {
             static_assert(std::uses_allocator_v<Type, Allocator>, "Ill-formed request");
             static_assert(std::uses_allocator_v<Type, Allocator>, "Ill-formed request");
 
 
-            if constexpr(std::is_constructible_v<Type, std::allocator_arg_t, const Allocator &, Params...>) {
+            if constexpr(stl::is_constructible_v<Type, std::allocator_arg_t, const Allocator &, Params...>) {
                 return stl::tuple<std::allocator_arg_t, const Allocator &, Params &&...>{std::allocator_arg, allocator, stl::forward<Params>(params)...};
                 return stl::tuple<std::allocator_arg_t, const Allocator &, Params &&...>{std::allocator_arg, allocator, stl::forward<Params>(params)...};
             } else {
             } else {
-                static_assert(std::is_constructible_v<Type, Params..., const Allocator &>, "Ill-formed request");
+                static_assert(stl::is_constructible_v<Type, Params..., const Allocator &>, "Ill-formed request");
                 return stl::forward_as_tuple(stl::forward<Params>(params)..., allocator);
                 return stl::forward_as_tuple(stl::forward<Params>(params)..., allocator);
             }
             }
         }
         }

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

@@ -185,7 +185,7 @@ class meta_any {
         if constexpr(is_meta_pointer_like_v<Type>) {
         if constexpr(is_meta_pointer_like_v<Type>) {
             if(req == internal::meta_traits::is_pointer) {
             if(req == internal::meta_traits::is_pointer) {
                 if constexpr(!stl::is_void_v<stl::remove_const_t<typename std::pointer_traits<Type>::element_type>>) {
                 if constexpr(!stl::is_void_v<stl::remove_const_t<typename std::pointer_traits<Type>::element_type>>) {
-                    if constexpr(std::is_constructible_v<bool, Type>) {
+                    if constexpr(stl::is_constructible_v<bool, Type>) {
                         if(const auto &pointer_like = any_cast<const Type &>(value.storage); pointer_like) {
                         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));
                             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));
                         }
                         }

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

@@ -14,6 +14,7 @@ using std::invoke_result_t;
 using std::is_aggregate_v;
 using std::is_aggregate_v;
 using std::is_array_v;
 using std::is_array_v;
 using std::is_const_v;
 using std::is_const_v;
+using std::is_constructible_v;
 using std::is_copy_assignable_v;
 using std::is_copy_assignable_v;
 using std::is_copy_constructible_v;
 using std::is_copy_constructible_v;
 using std::is_default_constructible_v;
 using std::is_default_constructible_v;