mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-24 05:44:26 +08:00
fix some compilation issues with clang (and hopefully bring eigen more
close to std ?)
This commit is contained in:
parent
17d080edf2
commit
2ab446695b
@ -184,7 +184,7 @@ template<typename Derived>
|
|||||||
EIGEN_STRONG_INLINE const typename DenseBase<Derived>::ConstantReturnType
|
EIGEN_STRONG_INLINE const typename DenseBase<Derived>::ConstantReturnType
|
||||||
DenseBase<Derived>::Constant(int rows, int cols, const Scalar& value)
|
DenseBase<Derived>::Constant(int rows, int cols, const Scalar& value)
|
||||||
{
|
{
|
||||||
return NullaryExpr(rows, cols, ei_scalar_constant_op<Scalar>(value));
|
return DenseBase<Derived>::NullaryExpr(rows, cols, ei_scalar_constant_op<Scalar>(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns an expression of a constant matrix of value \a value
|
/** \returns an expression of a constant matrix of value \a value
|
||||||
@ -206,7 +206,7 @@ template<typename Derived>
|
|||||||
EIGEN_STRONG_INLINE const typename DenseBase<Derived>::ConstantReturnType
|
EIGEN_STRONG_INLINE const typename DenseBase<Derived>::ConstantReturnType
|
||||||
DenseBase<Derived>::Constant(int size, const Scalar& value)
|
DenseBase<Derived>::Constant(int size, const Scalar& value)
|
||||||
{
|
{
|
||||||
return NullaryExpr(size, ei_scalar_constant_op<Scalar>(value));
|
return DenseBase<Derived>::NullaryExpr(size, ei_scalar_constant_op<Scalar>(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns an expression of a constant matrix of value \a value
|
/** \returns an expression of a constant matrix of value \a value
|
||||||
@ -223,7 +223,7 @@ EIGEN_STRONG_INLINE const typename DenseBase<Derived>::ConstantReturnType
|
|||||||
DenseBase<Derived>::Constant(const Scalar& value)
|
DenseBase<Derived>::Constant(const Scalar& value)
|
||||||
{
|
{
|
||||||
EIGEN_STATIC_ASSERT_FIXED_SIZE(Derived)
|
EIGEN_STATIC_ASSERT_FIXED_SIZE(Derived)
|
||||||
return NullaryExpr(RowsAtCompileTime, ColsAtCompileTime, ei_scalar_constant_op<Scalar>(value));
|
return DenseBase<Derived>::NullaryExpr(RowsAtCompileTime, ColsAtCompileTime, ei_scalar_constant_op<Scalar>(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -246,7 +246,7 @@ EIGEN_STRONG_INLINE const typename DenseBase<Derived>::SequentialLinSpacedReturn
|
|||||||
DenseBase<Derived>::LinSpaced(Sequential_t, const Scalar& low, const Scalar& high, int size)
|
DenseBase<Derived>::LinSpaced(Sequential_t, const Scalar& low, const Scalar& high, int size)
|
||||||
{
|
{
|
||||||
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
||||||
return NullaryExpr(size, ei_linspaced_op<Scalar,false>(low,high,size));
|
return DenseBase<Derived>::NullaryExpr(size, ei_linspaced_op<Scalar,false>(low,high,size));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -266,7 +266,7 @@ EIGEN_STRONG_INLINE const typename DenseBase<Derived>::RandomAccessLinSpacedRetu
|
|||||||
DenseBase<Derived>::LinSpaced(const Scalar& low, const Scalar& high, int size)
|
DenseBase<Derived>::LinSpaced(const Scalar& low, const Scalar& high, int size)
|
||||||
{
|
{
|
||||||
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
||||||
return NullaryExpr(size, ei_linspaced_op<Scalar,true>(low,high,size));
|
return DenseBase<Derived>::NullaryExpr(size, ei_linspaced_op<Scalar,true>(low,high,size));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns true if all coefficients in this matrix are approximately equal to \a value, to within precision \a prec */
|
/** \returns true if all coefficients in this matrix are approximately equal to \a value, to within precision \a prec */
|
||||||
@ -640,7 +640,7 @@ template<typename Derived>
|
|||||||
EIGEN_STRONG_INLINE const typename MatrixBase<Derived>::IdentityReturnType
|
EIGEN_STRONG_INLINE const typename MatrixBase<Derived>::IdentityReturnType
|
||||||
MatrixBase<Derived>::Identity(int rows, int cols)
|
MatrixBase<Derived>::Identity(int rows, int cols)
|
||||||
{
|
{
|
||||||
return NullaryExpr(rows, cols, ei_scalar_identity_op<Scalar>());
|
return DenseBase<Derived>::NullaryExpr(rows, cols, ei_scalar_identity_op<Scalar>());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns an expression of the identity matrix (not necessarily square).
|
/** \returns an expression of the identity matrix (not necessarily square).
|
||||||
@ -658,7 +658,7 @@ EIGEN_STRONG_INLINE const typename MatrixBase<Derived>::IdentityReturnType
|
|||||||
MatrixBase<Derived>::Identity()
|
MatrixBase<Derived>::Identity()
|
||||||
{
|
{
|
||||||
EIGEN_STATIC_ASSERT_FIXED_SIZE(Derived)
|
EIGEN_STATIC_ASSERT_FIXED_SIZE(Derived)
|
||||||
return NullaryExpr(RowsAtCompileTime, ColsAtCompileTime, ei_scalar_identity_op<Scalar>());
|
return MatrixBase<Derived>::NullaryExpr(RowsAtCompileTime, ColsAtCompileTime, ei_scalar_identity_op<Scalar>());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns true if *this is approximately equal to the identity matrix
|
/** \returns true if *this is approximately equal to the identity matrix
|
||||||
|
@ -83,7 +83,7 @@ template<typename Derived> class DenseBase
|
|||||||
using Base::outerStride;
|
using Base::outerStride;
|
||||||
using Base::rowStride;
|
using Base::rowStride;
|
||||||
using Base::colStride;
|
using Base::colStride;
|
||||||
using Base::CoeffReturnType;
|
using typename Base::CoeffReturnType;
|
||||||
|
|
||||||
#endif // not EIGEN_PARSED_BY_DOXYGEN
|
#endif // not EIGEN_PARSED_BY_DOXYGEN
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ class DenseCoeffsBase<Derived, true> : public DenseCoeffsBase<Derived, false>
|
|||||||
|
|
||||||
typedef DenseCoeffsBase<Derived, false> Base;
|
typedef DenseCoeffsBase<Derived, false> Base;
|
||||||
typedef typename ei_traits<Derived>::Scalar Scalar;
|
typedef typename ei_traits<Derived>::Scalar Scalar;
|
||||||
using Base::CoeffReturnType;
|
using typename Base::CoeffReturnType;
|
||||||
using Base::coeff;
|
using Base::coeff;
|
||||||
using Base::rows;
|
using Base::rows;
|
||||||
using Base::cols;
|
using Base::cols;
|
||||||
|
@ -152,6 +152,7 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularView
|
|||||||
typedef typename MatrixType::PlainObject DenseMatrixType;
|
typedef typename MatrixType::PlainObject DenseMatrixType;
|
||||||
typedef typename MatrixType::Nested MatrixTypeNested;
|
typedef typename MatrixType::Nested MatrixTypeNested;
|
||||||
typedef typename ei_cleantype<MatrixTypeNested>::type _MatrixTypeNested;
|
typedef typename ei_cleantype<MatrixTypeNested>::type _MatrixTypeNested;
|
||||||
|
using TriangularBase<TriangularView<_MatrixType, _Mode> >::evalToLazy;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
Mode = _Mode,
|
Mode = _Mode,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user