mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-02-17 18:09:55 +08:00
Even ReturnByValue should not evaluate when assembling the expression
This commit is contained in:
parent
da6ec81282
commit
2bf63c6b4a
@ -33,6 +33,7 @@ struct traits<ReturnByValue<Derived> >
|
||||
};
|
||||
};
|
||||
|
||||
#ifndef EIGEN_TEST_EVALUATORS
|
||||
/* The ReturnByValue object doesn't even have a coeff() method.
|
||||
* So the only way that nesting it in an expression can work, is by evaluating it into a plain matrix.
|
||||
* So internal::nested always gives the plain return matrix type.
|
||||
@ -44,6 +45,13 @@ struct nested<ReturnByValue<Derived>, n, PlainObject>
|
||||
{
|
||||
typedef typename traits<Derived>::ReturnType type;
|
||||
};
|
||||
#else
|
||||
template<typename Derived,int n,typename PlainObject>
|
||||
struct nested_eval<ReturnByValue<Derived>, n, PlainObject>
|
||||
{
|
||||
typedef typename traits<Derived>::ReturnType type;
|
||||
};
|
||||
#endif
|
||||
|
||||
} // end namespace internal
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user