diff --git a/Eigen/src/Core/StlIterators.h b/Eigen/src/Core/StlIterators.h index 3ab7d2101..bb897f8c6 100644 --- a/Eigen/src/Core/StlIterators.h +++ b/Eigen/src/Core/StlIterators.h @@ -325,7 +325,13 @@ class pointer_based_stl_iterator { public: typedef Index difference_type; typedef typename XprType::Scalar value_type; +#if __cplusplus >= 202002L + typedef std::conditional_t + iterator_category; +#else typedef std::random_access_iterator_tag iterator_category; +#endif typedef std::conditional_t pointer; typedef std::conditional_t reference;