Add construct_at, destroy_at wrappers. Use throughout.

This commit is contained in:
Tobias Schlüter
2022-03-08 20:43:22 +00:00
committed by Rasmus Munk Larsen
parent dfa5176780
commit cd2ba9d03e
18 changed files with 78 additions and 51 deletions

View File

@@ -1723,14 +1723,14 @@ struct evaluator<EvalToTemp<ArgType> >
EIGEN_DEVICE_FUNC explicit evaluator(const XprType& xpr)
: m_result(xpr.arg())
{
::new (static_cast<Base*>(this)) Base(m_result);
internal::construct_at<Base>(this, m_result);
}
// This constructor is used when nesting an EvalTo evaluator in another evaluator
EIGEN_DEVICE_FUNC evaluator(const ArgType& arg)
: m_result(arg)
{
::new (static_cast<Base*>(this)) Base(m_result);
internal::construct_at<Base>(this, m_result);
}
protected: