Lines 1-18
Link Here
|
1 |
diff --git a/devel/sol2/files/extra-patch-include_sol_optional__implementation.hpp b/devel/sol2/files/extra-patch-include_sol_optional__implementation.hpp |
|
|
2 |
new file mode 100644 |
3 |
index 0000000000..5abee70fb2 |
4 |
--- /dev/null |
5 |
+++ b/devel/sol2/files/extra-patch-include_sol_optional__implementation.hpp |
6 |
@@ -0,0 +1,12 @@ |
7 |
+--- include/sol/optional_implementation.hpp.orig 2021-03-06 06:03:23 UTC |
8 |
++++ include/sol/optional_implementation.hpp |
9 |
+@@ -2191,7 +2191,8 @@ namespace sol { |
10 |
+ static_assert(std::is_constructible<T, Args&&...>::value, "T must be constructible with Args"); |
11 |
+ |
12 |
+ *this = nullopt; |
13 |
+- this->construct(std::forward<Args>(args)...); |
14 |
++ new (static_cast<void*>(this)) optional(std::in_place, std::forward<Args>(args)...); |
15 |
++ return **this; |
16 |
+ } |
17 |
+ |
18 |
+ /// Swaps this optional with the other. |