Use wrapper macro for multidimensional subscript feature test

See merge request libeigen/eigen!2059
This commit is contained in:
Tyler Veness
2025-11-04 22:26:27 +00:00
committed by Rasmus Munk Larsen
parent 63fc0bc8c1
commit 06f5cb4878
7 changed files with 12 additions and 7 deletions

View File

@@ -63,7 +63,7 @@ class companion {
}
}
#if __cpp_multidimensional_subscript >= 202110L
#ifdef EIGEN_MULTIDIMENSIONAL_SUBSCRIPT
EIGEN_STRONG_INLINE const Scalar_ operator[](Index row, Index col) const { return operator()(row, col); }
#endif

View File

@@ -280,7 +280,7 @@ class RandomSetter {
return m_hashmaps[outerMajor][key].value;
}
#if __cpp_multidimensional_subscript >= 202110L
#ifdef EIGEN_MULTIDIMENSIONAL_SUBSCRIPT
/** \returns a reference to the coefficient at given coordinates \a row, \a col */
Scalar& operator[](Index row, Index col) { return operator()(row, col); }
#endif