mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-22 09:39:34 +08:00
compilation fix: make the generic template ctor explicit
This commit is contained in:
parent
2049f742e4
commit
1443094072
@ -45,14 +45,10 @@ struct ei_traits<Replicate<MatrixType,RowFactor,ColFactor> >
|
|||||||
typedef typename ei_nested<MatrixType>::type MatrixTypeNested;
|
typedef typename ei_nested<MatrixType>::type MatrixTypeNested;
|
||||||
typedef typename ei_unref<MatrixTypeNested>::type _MatrixTypeNested;
|
typedef typename ei_unref<MatrixTypeNested>::type _MatrixTypeNested;
|
||||||
enum {
|
enum {
|
||||||
RowsPlusOne = (MatrixType::RowsAtCompileTime != Dynamic) ?
|
RowsAtCompileTime = RowFactor==Dynamic || int(MatrixType::RowsAtCompileTime)==Dynamic
|
||||||
int(MatrixType::RowsAtCompileTime) + 1 : Dynamic,
|
|
||||||
ColsPlusOne = (MatrixType::ColsAtCompileTime != Dynamic) ?
|
|
||||||
int(MatrixType::ColsAtCompileTime) + 1 : Dynamic,
|
|
||||||
RowsAtCompileTime = RowFactor==Dynamic || MatrixType::RowsAtCompileTime==Dynamic
|
|
||||||
? Dynamic
|
? Dynamic
|
||||||
: RowFactor * MatrixType::RowsAtCompileTime,
|
: RowFactor * MatrixType::RowsAtCompileTime,
|
||||||
ColsAtCompileTime = ColFactor==Dynamic || MatrixType::ColsAtCompileTime==Dynamic
|
ColsAtCompileTime = ColFactor==Dynamic || int(MatrixType::ColsAtCompileTime)==Dynamic
|
||||||
? Dynamic
|
? Dynamic
|
||||||
: ColFactor * MatrixType::ColsAtCompileTime,
|
: ColFactor * MatrixType::ColsAtCompileTime,
|
||||||
MaxRowsAtCompileTime = RowsAtCompileTime,
|
MaxRowsAtCompileTime = RowsAtCompileTime,
|
||||||
@ -70,7 +66,7 @@ template<typename MatrixType,int RowFactor,int ColFactor> class Replicate
|
|||||||
EIGEN_GENERIC_PUBLIC_INTERFACE(Replicate)
|
EIGEN_GENERIC_PUBLIC_INTERFACE(Replicate)
|
||||||
|
|
||||||
template<typename OriginalMatrixType>
|
template<typename OriginalMatrixType>
|
||||||
inline Replicate(const OriginalMatrixType& matrix)
|
inline explicit Replicate(const OriginalMatrixType& matrix)
|
||||||
: m_matrix(matrix), m_rowFactor(RowFactor), m_colFactor(ColFactor)
|
: m_matrix(matrix), m_rowFactor(RowFactor), m_colFactor(ColFactor)
|
||||||
{
|
{
|
||||||
EIGEN_STATIC_ASSERT((ei_is_same_type<MatrixType,OriginalMatrixType>::ret),
|
EIGEN_STATIC_ASSERT((ei_is_same_type<MatrixType,OriginalMatrixType>::ret),
|
||||||
@ -113,7 +109,7 @@ template<int RowFactor, int ColFactor>
|
|||||||
inline const Replicate<Derived,RowFactor,ColFactor>
|
inline const Replicate<Derived,RowFactor,ColFactor>
|
||||||
MatrixBase<Derived>::replicate() const
|
MatrixBase<Derived>::replicate() const
|
||||||
{
|
{
|
||||||
return derived();
|
return Replicate<Derived,RowFactor,ColFactor>(derived());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \nonstableyet
|
/** \nonstableyet
|
||||||
|
Loading…
x
Reference in New Issue
Block a user