summaryrefslogtreecommitdiff
path: root/dev-qt/qt-creator/files/qt-creator-14.0.1-sol2-clang19-gcc15.patch
blob: 29e600ca33efc5d42f02f108c27809f6343c8ce2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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<T, Args&&...>::value, "T must be constructible with Args");
 
 			*this = nullopt;
-			this->construct(std::forward<Args>(args)...);
+			new (static_cast<void*>(this)) optional(std::in_place, std::forward<Args>(args)...);
+			return **this;
 		}
 
 		/// Swaps this optional with the other.