https://bugs.gentoo.org/938486 https://bugs.gentoo.org/937600 https://bugs.gentoo.org/936924 https://bugreports.qt.io/browse/QTCREATORBUG-31517 https://github.com/ThePhD/sol2/commit/d805d027e0a0a7222e936926139f06e23828ce9f https://codereview.qt-project.org/c/qt-creator/qt-creator/+/587620 --- a/src/libs/3rdparty/sol2/include/sol/sol.hpp +++ b/src/libs/3rdparty/sol2/include/sol/sol.hpp @@ -6818,7 +6818,8 @@ 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.