Răsfoiți Sursa

registry: use the right type within assure - close #1088

Michele Caini 2 ani în urmă
părinte
comite
00d0ff2e45
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      src/entt/entity/registry.hpp

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

@@ -259,7 +259,7 @@ class basic_registry {
                 using storage_type = storage_for_type<Type>;
                 using storage_type = storage_for_type<Type>;
                 using alloc_type = typename storage_type::allocator_type;
                 using alloc_type = typename storage_type::allocator_type;
 
 
-                if constexpr(std::is_void_v<void> && !std::is_constructible_v<alloc_type, allocator_type>) {
+                if constexpr(std::is_void_v<Type> && !std::is_constructible_v<alloc_type, allocator_type>) {
                     // std::allocator<void> has no cross constructors (waiting for C++20)
                     // std::allocator<void> has no cross constructors (waiting for C++20)
                     cpool = std::allocate_shared<storage_type>(get_allocator(), alloc_type{});
                     cpool = std::allocate_shared<storage_type>(get_allocator(), alloc_type{});
                 } else {
                 } else {