From d58678069c6c90ac6fe6bdeac5e95fd9ea1a2235 Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Fri, 9 Apr 2021 17:03:28 +0000 Subject: Make iterators default constructible and assignable, by making... --- Eigen/src/Core/util/XprHelper.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Eigen/src/Core/util') diff --git a/Eigen/src/Core/util/XprHelper.h b/Eigen/src/Core/util/XprHelper.h index 9c7771797..2c63a9524 100644 --- a/Eigen/src/Core/util/XprHelper.h +++ b/Eigen/src/Core/util/XprHelper.h @@ -136,15 +136,14 @@ template class variable_if_dynamic EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR operator T() const { return T(Value); } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE - void setValue(T) const {} + void setValue(T v) const { EIGEN_ONLY_USED_FOR_DEBUG(v); eigen_assert(v == T(Value)); } }; template class variable_if_dynamic { T m_value; - EIGEN_DEVICE_FUNC variable_if_dynamic() { eigen_assert(false); } public: - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit variable_if_dynamic(T value) : m_value(value) {} + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit variable_if_dynamic(T value = 0) EIGEN_NO_THROW : m_value(value) {} EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T value() const { return m_value; } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE operator T() const { return m_value; } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void setValue(T value) { m_value = value; } -- cgit v1.2.3