0
0
mirror of https://gitlab.com/libeigen/eigen.git synced 2026-01-18 17:31:19 +01:00

Fix warnings related to variable_if_dynamic.

libeigen/eigen!2107

Closes #2807
This commit is contained in:
Antonio Sánchez
2026-01-16 19:47:14 +00:00
committed by Charles Schlosser
parent 9a37aca9fc
commit 918a5f1a6f
2 changed files with 3 additions and 5 deletions

View File

@@ -335,10 +335,9 @@ class pointer_based_stl_iterator {
typedef std::conditional_t<bool(is_lvalue), value_type*, const value_type*> pointer;
typedef std::conditional_t<bool(is_lvalue), value_type&, const value_type&> reference;
pointer_based_stl_iterator() noexcept : m_ptr(0) {}
pointer_based_stl_iterator(XprType& xpr, Index index) noexcept : m_incr(xpr.innerStride()) {
m_ptr = xpr.data() + index * m_incr.value();
}
pointer_based_stl_iterator() noexcept : m_ptr(0), m_incr(XprType::InnerStrideAtCompileTime) {}
pointer_based_stl_iterator(XprType& xpr, Index index) noexcept
: m_ptr(xpr.data() + index * xpr.innerStride()), m_incr(xpr.innerStride()) {}
pointer_based_stl_iterator(const non_const_iterator& other) noexcept : m_ptr(other.m_ptr), m_incr(other.m_incr) {}

View File

@@ -153,7 +153,6 @@ struct promote_index_type {
template <typename T, int Value>
class variable_if_dynamic {
public:
EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(variable_if_dynamic)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE explicit variable_if_dynamic(T v) {
EIGEN_ONLY_USED_FOR_DEBUG(v);
eigen_assert(v == T(Value));