From 392b95bdf135cd991f6d09c5ff3b1bd2f01fb5f4 Mon Sep 17 00:00:00 2001 From: Louis David Date: Thu, 6 Jun 2024 21:38:09 +0000 Subject: [PATCH] allow pointer_based_stl_iterator to conform to the contiguous_iterator concept if we are in c++20 --- Eigen/src/Core/StlIterators.h | 6 ++++++ 1 file changed, 6 insertions(+) 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;