View | Details | Raw Unified | Return to bug 283287 | Differences between
and this patch

Collapse All | Expand All

(-)devel/sol2/Makefile (-5 / +1 lines)
Lines 1-7 Link Here
1
PORTNAME=	sol2
1
PORTNAME=	sol2
2
DISTVERSIONPREFIX=	v
2
DISTVERSIONPREFIX=	v
3
DISTVERSION=	4.0.0-alpha
3
DISTVERSION=	4.0.0-alpha
4
PORTREVISION=	2
4
PORTREVISION=	1
5
CATEGORIES=	devel
5
CATEGORIES=	devel
6
6
7
MAINTAINER=	yuri@FreeBSD.org
7
MAINTAINER=	yuri@FreeBSD.org
Lines 25-34 Link Here
25
.if ${CHOSEN_COMPILER_TYPE} == clang && \
25
.if ${CHOSEN_COMPILER_TYPE} == clang && \
26
	${COMPILER_VERSION} >= 180 && ${COMPILER_VERSION} < 190
26
	${COMPILER_VERSION} >= 180 && ${COMPILER_VERSION} < 190
27
EXTRA_PATCHES=	${PATCHDIR}/extra-patch-include_sol_function__types__stateless.hpp
27
EXTRA_PATCHES=	${PATCHDIR}/extra-patch-include_sol_function__types__stateless.hpp
28
.endif
29
.if ${CHOSEN_COMPILER_TYPE} == clang && \
30
	${COMPILER_VERSION} >= 191
31
EXTRA_PATCHES=	${PATCHDIR}/extra-patch-include_sol_optional__implementation.hpp
32
.endif
28
.endif
33
29
34
.include <bsd.port.post.mk>
30
.include <bsd.port.post.mk>
(-)devel/sol2/sol2.patch (-18 lines)
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.

Return to bug 283287