mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-28 15:52:01 +08:00
Use void type if stl-style iterators are not supported
This commit is contained in:
parent
f3130ee1ba
commit
2bf1a31d81
@ -594,12 +594,12 @@ template<typename Derived> class DenseBase
|
|||||||
|
|
||||||
typedef typename internal::conditional< IsVectorAtCompileTime,
|
typedef typename internal::conditional< IsVectorAtCompileTime,
|
||||||
iterator_type,
|
iterator_type,
|
||||||
internal::not_an_iterator<const Derived>
|
void
|
||||||
>::type iterator;
|
>::type iterator;
|
||||||
|
|
||||||
typedef typename internal::conditional< IsVectorAtCompileTime,
|
typedef typename internal::conditional< IsVectorAtCompileTime,
|
||||||
const_iterator_type,
|
const_iterator_type,
|
||||||
internal::not_an_iterator<const Derived>
|
void
|
||||||
>::type const_iterator;
|
>::type const_iterator;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -11,19 +11,6 @@ namespace Eigen {
|
|||||||
|
|
||||||
namespace internal {
|
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>
|
template<typename XprType,typename Derived>
|
||||||
class indexed_based_stl_iterator_base
|
class indexed_based_stl_iterator_base
|
||||||
{
|
{
|
||||||
|
@ -135,7 +135,6 @@ template<typename Derived> class SolverBase;
|
|||||||
template<typename XprType> class InnerIterator;
|
template<typename XprType> class InnerIterator;
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
template<typename XprType> class not_an_iterator;
|
|
||||||
template<typename XprType> class generic_randaccess_stl_iterator;
|
template<typename XprType> class generic_randaccess_stl_iterator;
|
||||||
template<typename XprType> class pointer_based_stl_iterator;
|
template<typename XprType> class pointer_based_stl_iterator;
|
||||||
template<typename XprType, DirectionType Direction> class subvector_stl_iterator;
|
template<typename XprType, DirectionType Direction> class subvector_stl_iterator;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user