summaryrefslogtreecommitdiff
path: root/games-util/slade/files/slade-3.2.6-fix-sol.patch
blob: d0aa3b993f7d22b1041aac52a618da2460012a25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/thirdparty/sol/sol.hpp b/thirdparty/sol/sol.hpp
index 3ff9ad1c..eb73973b 100644
--- a/thirdparty/sol/sol.hpp
+++ b/thirdparty/sol/sol.hpp
@@ -5968,7 +5968,8 @@ namespace sol {
 			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.