Use void type if stl-style iterators are not supported

This commit is contained in:
Eugene Zhulenev 2018-10-10 10:31:40 -07:00
parent f3130ee1ba
commit 2bf1a31d81
3 changed files with 2 additions and 16 deletions

View File

@ -594,12 +594,12 @@ template<typename Derived> class DenseBase
typedef typename internal::conditional< IsVectorAtCompileTime,
iterator_type,
internal::not_an_iterator<const Derived>
void
>::type iterator;
typedef typename internal::conditional< IsVectorAtCompileTime,
const_iterator_type,
internal::not_an_iterator<const Derived>
void
>::type const_iterator;
#endif

View File

@ -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<typename XprType>
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<typename XprType,typename Derived>
class indexed_based_stl_iterator_base
{

View File

@ -135,7 +135,6 @@ template<typename Derived> class SolverBase;
template<typename XprType> class InnerIterator;
namespace internal {
template<typename XprType> class not_an_iterator;
template<typename XprType> class generic_randaccess_stl_iterator;
template<typename XprType> class pointer_based_stl_iterator;
template<typename XprType, DirectionType Direction> class subvector_stl_iterator;