diff --git a/src/libs/3rdparty/sol2/include/sol/sol.hpp b/src/libs/3rdparty/sol2/include/sol/sol.hpp index 85665a50c93..c3e5fa31ae3 100644 --- a/src/libs/3rdparty/sol2/include/sol/sol.hpp +++ b/src/libs/3rdparty/sol2/include/sol/sol.hpp @@ -6818,7 +6818,8 @@ namespace sol { static_assert(std::is_constructible::value, "T must be constructible with Args"); *this = nullopt; - this->construct(std::forward(args)...); + new (static_cast(this)) optional(std::in_place, std::forward(args)...); + return **this; } /// Swaps this optional with the other.