diff --git a/Eigen/src/Core/DenseBase.h b/Eigen/src/Core/DenseBase.h index 046c46e4e..728bd87df 100644 --- a/Eigen/src/Core/DenseBase.h +++ b/Eigen/src/Core/DenseBase.h @@ -26,30 +26,6 @@ #ifndef EIGEN_DENSEBASE_H #define EIGEN_DENSEBASE_H -template::ret> -struct ei_inner_stride_at_compile_time -{ - enum { ret = ei_traits::InnerStrideAtCompileTime }; -}; - -template -struct ei_inner_stride_at_compile_time -{ - enum { ret = 0 }; -}; - -template::ret> -struct ei_outer_stride_at_compile_time -{ - enum { ret = ei_traits::OuterStrideAtCompileTime }; -}; - -template -struct ei_outer_stride_at_compile_time -{ - enum { ret = 0 }; -}; - /** \class DenseBase * * \brief Base class for all dense matrices, vectors, and arrays diff --git a/Eigen/src/Core/DenseCoeffsBase.h b/Eigen/src/Core/DenseCoeffsBase.h index faebc0b14..d79b5c107 100644 --- a/Eigen/src/Core/DenseCoeffsBase.h +++ b/Eigen/src/Core/DenseCoeffsBase.h @@ -214,6 +214,11 @@ class DenseCoeffsBase : public EigenBase } protected: + // explanation: DenseBase is doing "using ..." on the methods from DenseCoeffsBase. + // But some methods are only available in the EnableDirectAccessAPI case. + // So we add dummy methods here with these names, so that "using... " doesn't fail. + // It's not private so that the child class DenseBase can access them, and it's not public + // either since it's an implementation detail, so has to be protected. void coeffRef(); void coeffRefByOuterInner(); void writePacket(); @@ -570,4 +575,28 @@ inline static int ei_first_aligned(const Derived& m) ::run(m); } +template::ret> +struct ei_inner_stride_at_compile_time +{ + enum { ret = ei_traits::InnerStrideAtCompileTime }; +}; + +template +struct ei_inner_stride_at_compile_time +{ + enum { ret = 0 }; +}; + +template::ret> +struct ei_outer_stride_at_compile_time +{ + enum { ret = ei_traits::OuterStrideAtCompileTime }; +}; + +template +struct ei_outer_stride_at_compile_time +{ + enum { ret = 0 }; +}; + #endif // EIGEN_COEFFS_H