From 2bf1a31d811fef2085bad97f98e2d0095136b636 Mon Sep 17 00:00:00 2001 From: Eugene Zhulenev Date: Wed, 10 Oct 2018 10:31:40 -0700 Subject: [PATCH] Use void type if stl-style iterators are not supported --- Eigen/src/Core/DenseBase.h | 4 ++-- Eigen/src/Core/StlIterators.h | 13 ------------- Eigen/src/Core/util/ForwardDeclarations.h | 1 - 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/Eigen/src/Core/DenseBase.h b/Eigen/src/Core/DenseBase.h index eedeacc94..2a0927317 100644 --- a/Eigen/src/Core/DenseBase.h +++ b/Eigen/src/Core/DenseBase.h @@ -594,12 +594,12 @@ template class DenseBase typedef typename internal::conditional< IsVectorAtCompileTime, iterator_type, - internal::not_an_iterator + void >::type iterator; typedef typename internal::conditional< IsVectorAtCompileTime, const_iterator_type, - internal::not_an_iterator + void >::type const_iterator; #endif diff --git a/Eigen/src/Core/StlIterators.h b/Eigen/src/Core/StlIterators.h index 5f2edc4e6..24eef1269 100644 --- a/Eigen/src/Core/StlIterators.h +++ b/Eigen/src/Core/StlIterators.h @@ -11,19 +11,6 @@ namespace Eigen { namespace internal { -// Iterator type for XprType that do not support stl-style iterators. Allows to -// detect that expression does not support stl iterators at compile time. -template -class not_an_iterator -{ - not_an_iterator() : mp_xpr(0), m_index(0) {} - not_an_iterator(XprType& xpr, Index index) : mp_xpr(&xpr), m_index(index) {} - - protected: - XprType *mp_xpr; - Index m_index; -}; - template class indexed_based_stl_iterator_base { diff --git a/Eigen/src/Core/util/ForwardDeclarations.h b/Eigen/src/Core/util/ForwardDeclarations.h index 49c4e0c31..3ab3a5f50 100644 --- a/Eigen/src/Core/util/ForwardDeclarations.h +++ b/Eigen/src/Core/util/ForwardDeclarations.h @@ -135,7 +135,6 @@ template class SolverBase; template class InnerIterator; namespace internal { -template class not_an_iterator; template class generic_randaccess_stl_iterator; template class pointer_based_stl_iterator; template class subvector_stl_iterator;