Fix Gcc8.5 warning about missing base class initialisation (#2404)

This commit is contained in:
Matthias Möller 2022-01-07 11:02:55 +01:00 committed by David Tellenbach
parent 47eac21072
commit c9df98b071
3 changed files with 3 additions and 3 deletions

View File

@ -275,7 +275,7 @@ class Tensor : public TensorBase<Tensor<Scalar_, NumIndices_, Options_, IndexTyp
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Tensor(const Self& other)
: m_storage(other.m_storage)
: Base(other), m_storage(other.m_storage)
{
}

View File

@ -215,7 +215,7 @@ class TensorFixedSize : public TensorBase<TensorFixedSize<Scalar_, Dimensions_,
EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE TensorFixedSize(const Self& other)
: m_storage(other.m_storage)
: Base(other), m_storage(other.m_storage)
{
}

View File

@ -174,7 +174,7 @@ template<typename PlainObjectType> class TensorRef : public TensorBase<TensorRef
unrefEvaluator();
}
TensorRef(const TensorRef& other) : m_evaluator(other.m_evaluator) {
TensorRef(const TensorRef& other) : TensorBase<TensorRef<PlainObjectType> >(other), m_evaluator(other.m_evaluator) {
eigen_assert(m_evaluator->refCount() > 0);
m_evaluator->incrRefCount();
}