diff --git a/src/entt/entity/storage.hpp b/src/entt/entity/storage.hpp index 6a76f5e3a..925e05865 100644 --- a/src/entt/entity/storage.hpp +++ b/src/entt/entity/storage.hpp @@ -841,7 +841,12 @@ public: * @return The associated allocator. */ [[nodiscard]] constexpr allocator_type get_allocator() const noexcept { - return allocator_type{base_type::get_allocator()}; + // std::allocator has no cross constructors (waiting for C++20) + if constexpr(std::is_same_v && !std::is_constructible_v) { + return allocator_type{}; + } else { + return allocator_type{base_type::get_allocator()}; + } } /**