libeigen: Backport a patch to make eigen_packet_wrapper trivial for c++11

A corresponding patch was removed with the upgrade to 3.4.1 since it had
been integrated upstream. However, it had also been reverted again,
which was not noticed.

This backports a subsequent fix for the problem.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Peter Kjellerstedt 2025-10-14 02:04:12 +02:00 committed by Khem Raj
parent 2ac3baccd8
commit e1915f54f1
No known key found for this signature in database
GPG Key ID: BB053355919D3314
2 changed files with 27 additions and 1 deletions

View File

@ -0,0 +1,26 @@
From 0295f81a835ef69e2bacd9e75ab5782eca398720 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Antonio=20S=C3=A1nchez?= <cantonios@google.com>
Date: Thu, 2 Oct 2025 17:53:19 +0000
Subject: [PATCH] Make `eigen_packet_wrapper` trivial for c++11.
Upstream-Status: Backport [https://gitlab.com/libeigen/eigen/-/commit/0295f81a835ef69e2bacd9e75ab5782eca398720]
---
Eigen/src/Core/GenericPacketMath.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Eigen/src/Core/GenericPacketMath.h b/Eigen/src/Core/GenericPacketMath.h
index af45f3936..4aeb77de8 100644
--- a/Eigen/src/Core/GenericPacketMath.h
+++ b/Eigen/src/Core/GenericPacketMath.h
@@ -160,7 +160,11 @@ struct eigen_packet_wrapper
{
EIGEN_ALWAYS_INLINE operator T&() { return m_val; }
EIGEN_ALWAYS_INLINE operator const T&() const { return m_val; }
+#if EIGEN_HAS_CXX11
+ EIGEN_ALWAYS_INLINE eigen_packet_wrapper() = default;
+#else
EIGEN_ALWAYS_INLINE eigen_packet_wrapper() {};
+#endif
EIGEN_ALWAYS_INLINE eigen_packet_wrapper(const T &v) : m_val(v) {}
EIGEN_ALWAYS_INLINE eigen_packet_wrapper& operator=(const T &v) {
m_val = v;

View File

@ -14,11 +14,11 @@ LIC_FILES_CHKSUM = "file://COPYING.MPL2;md5=815ca599c9df247a0c7f619bab123dad \
SRC_URI = "git://gitlab.com/libeigen/eigen.git;protocol=http;branch=3.4 \
file://0001-Remove-LGPL-Code-and-references.patch \
file://0001-Make-eigen_packet_wrapper-trivial-for-c-11.patch \
"
SRCREV = "d71c30c47858effcbd39967097a2d99ee48db464"
inherit cmake
PACKAGECONFIG ??= ""