mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-22 08:52:15 +08:00
Fixed the ProductReturnType (at least for UnrolledProducts).
Fixed operator= (MSVC specific) in Array.
This commit is contained in:
parent
a8ea2c8cef
commit
e48c3faf25
@ -53,12 +53,24 @@ class Array
|
|||||||
using Base::base;
|
using Base::base;
|
||||||
using Base::coeff;
|
using Base::coeff;
|
||||||
using Base::coeffRef;
|
using Base::coeffRef;
|
||||||
using Base::operator=;
|
|
||||||
using Base::operator+=;
|
using Base::operator+=;
|
||||||
using Base::operator-=;
|
using Base::operator-=;
|
||||||
using Base::operator*=;
|
using Base::operator*=;
|
||||||
using Base::operator/=;
|
using Base::operator/=;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The usage of
|
||||||
|
* using Base::operator=;
|
||||||
|
* fails on MSVC. Since the code below is working with GCC and MSVC, we skipped
|
||||||
|
* the usage of 'using'. This should be done only for operator=.
|
||||||
|
*/
|
||||||
|
template<typename OtherDerived>
|
||||||
|
EIGEN_STRONG_INLINE Array& operator=(const AnyMatrixBase<OtherDerived> &other)
|
||||||
|
{
|
||||||
|
return Base::operator=(other);
|
||||||
|
}
|
||||||
|
|
||||||
/** Copies the value of the expression \a other into \c *this with automatic resizing.
|
/** Copies the value of the expression \a other into \c *this with automatic resizing.
|
||||||
*
|
*
|
||||||
* *this might be resized to match the dimensions of \a other. If *this was a null matrix (not already initialized),
|
* *this might be resized to match the dimensions of \a other. If *this was a null matrix (not already initialized),
|
||||||
|
@ -135,8 +135,8 @@ struct ProductReturnType
|
|||||||
template<typename Lhs, typename Rhs>
|
template<typename Lhs, typename Rhs>
|
||||||
struct ProductReturnType<Lhs,Rhs,UnrolledProduct>
|
struct ProductReturnType<Lhs,Rhs,UnrolledProduct>
|
||||||
{
|
{
|
||||||
typedef typename ei_nested<Lhs, Rhs::ColsAtCompileTime, ei_plain_matrix_type<Lhs> >::type LhsNested;
|
typedef typename ei_nested<Lhs, Rhs::ColsAtCompileTime, typename ei_plain_matrix_type<Lhs>::type >::type LhsNested;
|
||||||
typedef typename ei_nested<Rhs, Lhs::RowsAtCompileTime, ei_plain_matrix_type<Rhs> >::type RhsNested;
|
typedef typename ei_nested<Rhs, Lhs::RowsAtCompileTime, typename ei_plain_matrix_type<Rhs>::type >::type RhsNested;
|
||||||
typedef GeneralProduct<LhsNested, RhsNested, UnrolledProduct> Type;
|
typedef GeneralProduct<LhsNested, RhsNested, UnrolledProduct> Type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user