use EIGEN_CPLUSPLUS instead of checking cpp version
diff --git a/Eigen/src/Core/StlIterators.h b/Eigen/src/Core/StlIterators.h index bb897f8..25d4575 100644 --- a/Eigen/src/Core/StlIterators.h +++ b/Eigen/src/Core/StlIterators.h
@@ -325,7 +325,7 @@ public: typedef Index difference_type; typedef typename XprType::Scalar value_type; -#if __cplusplus >= 202002L +#if EIGEN_CPLUSPLUS >= 202002L typedef std::conditional_t<XprType::InnerStrideAtCompileTime == 1, std::contiguous_iterator_tag, std::random_access_iterator_tag> iterator_category;