mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Store light-weight objects in evaluators by value.
This resolves failure in unit test caused by dying temporaries.
This commit is contained in:
@@ -440,7 +440,7 @@ struct evaluator_impl<CwiseUnaryView<UnaryOp, ArgType> >
|
||||
}
|
||||
|
||||
protected:
|
||||
const UnaryOp& m_unaryOp;
|
||||
const UnaryOp m_unaryOp;
|
||||
typename evaluator<ArgType>::type m_argImpl;
|
||||
};
|
||||
|
||||
@@ -782,7 +782,7 @@ struct evaluator_impl<PartialReduxExpr<ArgType, MemberOp, Direction> >
|
||||
}
|
||||
|
||||
protected:
|
||||
const XprType& m_expr;
|
||||
const XprType m_expr;
|
||||
};
|
||||
|
||||
|
||||
@@ -1148,7 +1148,7 @@ struct evaluator_impl<SelfCwiseBinaryOp<BinaryOp, LhsXpr, RhsXpr> >
|
||||
|
||||
protected:
|
||||
typename evaluator<LhsXpr>::type m_argImpl;
|
||||
const BinaryOp& m_functor;
|
||||
const BinaryOp m_functor;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user