re-enable usage of ProductBase::m_result and workaround a compilation failure when m_result is too large but unused

This commit is contained in:
Gael Guennebaud 2014-11-14 13:38:12 +01:00
parent 0e7a26c19f
commit a8cb0dfcf5

View File

@ -85,7 +85,10 @@ class ProductBase : public MatrixBase<Derived>
public:
typedef typename Base::PlainObject PlainObject;
typedef typename Base::PlainObject BasePlainObject;
typedef Matrix<Scalar,RowsAtCompileTime==1?1:Dynamic,ColsAtCompileTime==1?1:Dynamic,BasePlainObject::Options> DynPlainObject;
typedef typename internal::conditional<BasePlainObject::SizeAtCompileTime==Dynamic||BasePlainObject::SizeAtCompileTime*sizeof(Scalar) < EIGEN_STACK_ALLOCATION_LIMIT,
BasePlainObject, DynPlainObject>::type PlainObject;
ProductBase(const Lhs& a_lhs, const Rhs& a_rhs)
: m_lhs(a_lhs), m_rhs(a_rhs)
@ -182,6 +185,11 @@ struct nested<GeneralProduct<Lhs,Rhs,Mode>, N, PlainObject>
{
typedef PlainObject const& type;
};
template<typename Lhs, typename Rhs, int Mode, int N, typename PlainObject>
struct nested<const GeneralProduct<Lhs,Rhs,Mode>, N, PlainObject>
{
typedef PlainObject const& type;
};
}
template<typename NestedProduct>