diff --git a/games/openmw/files/patch-extern_sol3_sol_optional__implementation.hpp b/games/openmw/files/patch-extern_sol3_sol_optional__implementation.hpp new file mode 100644 index 000000000000..ac31cf924f51 --- /dev/null +++ b/games/openmw/files/patch-extern_sol3_sol_optional__implementation.hpp @@ -0,0 +1,12 @@ +--- extern/sol3/sol/optional_implementation.hpp.orig 2023-08-08 09:23:20 UTC ++++ extern/sol3/sol/optional_implementation.hpp +@@ -2191,7 +2191,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.