diff --git a/src/entt/core/any.hpp b/src/entt/core/any.hpp index 93ffba3e6..9e55f1d11 100644 --- a/src/entt/core/any.hpp +++ b/src/entt/core/any.hpp @@ -134,7 +134,8 @@ class basic_any { if constexpr(std::is_aggregate_v && (sizeof...(Args) != 0u || !std::is_default_constructible_v)) { instance = new plain_type{std::forward(args)...}; } else if constexpr(std::is_array_v) { - instance = new plain_type[std::extent_v](std::forward(args)...); + static_assert(sizeof...(Args) == 0u); + instance = new plain_type[std::extent_v](); } else { instance = new plain_type(std::forward(args)...); }