aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/NoAlias.h
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen/src/Core/NoAlias.h')
-rw-r--r--Eigen/src/Core/NoAlias.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/Eigen/src/Core/NoAlias.h b/Eigen/src/Core/NoAlias.h
index 30ddbeb3c..0542571e2 100644
--- a/Eigen/src/Core/NoAlias.h
+++ b/Eigen/src/Core/NoAlias.h
@@ -45,12 +45,18 @@ class NoAlias
public:
NoAlias(ExpressionType& expression) : m_expression(expression) {}
- /** Behaves like MatrixBase::lazyAssign(other)
- * \sa MatrixBase::lazyAssign() */
+ /* \sa MatrixBase::lazyAssign() */
template<typename OtherDerived>
EIGEN_STRONG_INLINE ExpressionType& operator=(const StorageBase<OtherDerived>& other)
{ return m_expression.lazyAssign(other.derived()); }
+ template<typename OtherDerived>
+ EIGEN_STRONG_INLINE ExpressionType& operator=(const ReturnByValue<OtherDerived>& other)
+ {
+ other.evalTo(m_expression);
+ return m_expression;
+ }
+
/** \sa MatrixBase::operator+= */
template<typename OtherDerived>
EIGEN_STRONG_INLINE ExpressionType& operator+=(const StorageBase<OtherDerived>& other)