diff --git a/src/entt/meta/utility.hpp b/src/entt/meta/utility.hpp index b0bdb0d32..0ea026b0f 100644 --- a/src/entt/meta/utility.hpp +++ b/src/entt/meta/utility.hpp @@ -419,7 +419,8 @@ template template [[nodiscard]] meta_any meta_construct(const meta_ctx &ctx, Candidate &&candidate, meta_any *const args) { if constexpr(meta_function_helper_t::is_static || std::is_class_v>>) { - return internal::meta_invoke(meta_any{meta_ctx_arg, ctx}, std::forward(candidate), args, std::make_index_sequence>::args_type::size>{}); + meta_any placeholder{meta_ctx_arg, ctx}; + return internal::meta_invoke(placeholder, std::forward(candidate), args, std::make_index_sequence>::args_type::size>{}); } else { // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic) - waiting for C++20 (and std::span) return internal::meta_invoke(*args, std::forward(candidate), args + 1u, std::make_index_sequence>::args_type::size>{});