skypjack 19 часов назад
Родитель
Сommit
257117ce8f

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

@@ -151,7 +151,7 @@ class basic_any: private internal::basic_any_storage<Len, Align> {
 
             mode = any_policy::embedded;
 
-            if constexpr(std::is_aggregate_v<plain_type> && (sizeof...(Args) != 0u || !std::is_default_constructible_v<plain_type>)) {
+            if constexpr(stl::is_aggregate_v<plain_type> && (sizeof...(Args) != 0u || !std::is_default_constructible_v<plain_type>)) {
                 ::new(&this->buffer) plain_type{stl::forward<Args>(args)...};
             } else {
                 // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-array-to-pointer-decay)
@@ -161,7 +161,7 @@ class basic_any: private internal::basic_any_storage<Len, Align> {
             deleter = &basic_deleter<plain_type>;
             mode = any_policy::dynamic;
 
-            if constexpr(std::is_aggregate_v<plain_type> && (sizeof...(Args) != 0u || !std::is_default_constructible_v<plain_type>)) {
+            if constexpr(stl::is_aggregate_v<plain_type> && (sizeof...(Args) != 0u || !std::is_default_constructible_v<plain_type>)) {
                 this->instance = new plain_type{stl::forward<Args>(args)...};
             } else if constexpr(std::is_array_v<plain_type>) {
                 static_assert(sizeof...(Args) == 0u, "Invalid arguments");

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

@@ -667,7 +667,7 @@ public:
      */
     template<typename... Args>
     value_type &emplace(const entity_type entt, Args &&...args) {
-        if constexpr(std::is_aggregate_v<value_type> && (sizeof...(Args) != 0u || !std::is_default_constructible_v<value_type>)) {
+        if constexpr(stl::is_aggregate_v<value_type> && (sizeof...(Args) != 0u || !std::is_default_constructible_v<value_type>)) {
             const auto it = emplace_element(entt, false, Type{stl::forward<Args>(args)...});
             return element_at(static_cast<size_type>(it.index()));
         } else {

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

@@ -69,7 +69,7 @@ public:
 
     template<typename... Args>
     void enqueue(Args &&...args) {
-        if constexpr(std::is_aggregate_v<Type> && (sizeof...(Args) != 0u || !std::is_default_constructible_v<Type>)) {
+        if constexpr(stl::is_aggregate_v<Type> && (sizeof...(Args) != 0u || !std::is_default_constructible_v<Type>)) {
             events.push_back(Type{stl::forward<Args>(args)...});
         } else {
             events.emplace_back(stl::forward<Args>(args)...);

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

@@ -9,6 +9,7 @@ namespace entt::stl {
 using std::decay_t;
 using std::false_type;
 using std::invoke_result_t;
+using std::is_aggregate_v;
 using std::is_invocable_r_v;
 using std::is_lvalue_reference_v;
 using std::is_member_object_pointer_v;