mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Replace Eigen type metaprogramming with corresponding std types and make use of alias templates
This commit is contained in:
committed by
Antonio Sánchez
parent
514f90c9ff
commit
421cbf0866
@@ -172,8 +172,8 @@ template<typename MatrixType, unsigned int Mode_>
|
||||
struct traits<TriangularView<MatrixType, Mode_> > : traits<MatrixType>
|
||||
{
|
||||
typedef typename ref_selector<MatrixType>::non_const_type MatrixTypeNested;
|
||||
typedef typename remove_reference<MatrixTypeNested>::type MatrixTypeNestedNonRef;
|
||||
typedef typename remove_all<MatrixTypeNested>::type MatrixTypeNestedCleaned;
|
||||
typedef std::remove_reference_t<MatrixTypeNested> MatrixTypeNestedNonRef;
|
||||
typedef remove_all_t<MatrixTypeNested> MatrixTypeNestedCleaned;
|
||||
typedef typename MatrixType::PlainObject FullMatrixType;
|
||||
typedef MatrixType ExpressionType;
|
||||
enum {
|
||||
@@ -199,8 +199,8 @@ template<typename MatrixType_, unsigned int Mode_> class TriangularView
|
||||
typedef typename internal::traits<TriangularView>::MatrixTypeNested MatrixTypeNested;
|
||||
typedef typename internal::traits<TriangularView>::MatrixTypeNestedNonRef MatrixTypeNestedNonRef;
|
||||
|
||||
typedef typename internal::remove_all<typename MatrixType::ConjugateReturnType>::type MatrixConjugateReturnType;
|
||||
typedef TriangularView<typename internal::add_const<MatrixType>::type, Mode_> ConstTriangularView;
|
||||
typedef internal::remove_all_t<typename MatrixType::ConjugateReturnType> MatrixConjugateReturnType;
|
||||
typedef TriangularView<std::add_const_t<MatrixType>, Mode_> ConstTriangularView;
|
||||
|
||||
public:
|
||||
|
||||
@@ -249,10 +249,10 @@ template<typename MatrixType_, unsigned int Mode_> class TriangularView
|
||||
*/
|
||||
template<bool Cond>
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline typename internal::conditional<Cond,ConjugateReturnType,ConstTriangularView>::type
|
||||
inline std::conditional_t<Cond,ConjugateReturnType,ConstTriangularView>
|
||||
conjugateIf() const
|
||||
{
|
||||
typedef typename internal::conditional<Cond,ConjugateReturnType,ConstTriangularView>::type ReturnType;
|
||||
typedef std::conditional_t<Cond,ConjugateReturnType,ConstTriangularView> ReturnType;
|
||||
return ReturnType(m_matrix.template conjugateIf<Cond>());
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ template<typename MatrixType_, unsigned int Mode_> class TriangularView
|
||||
/** \sa MatrixBase::transpose() */
|
||||
template<class Dummy=int>
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline TransposeReturnType transpose(typename internal::enable_if<Eigen::internal::is_lvalue<MatrixType>::value, Dummy*>::type = nullptr)
|
||||
inline TransposeReturnType transpose(std::enable_if_t<Eigen::internal::is_lvalue<MatrixType>::value, Dummy*> = nullptr)
|
||||
{
|
||||
typename MatrixType::TransposeReturnType tmp(m_matrix);
|
||||
return TransposeReturnType(tmp);
|
||||
@@ -731,10 +731,10 @@ struct evaluator_traits<TriangularView<MatrixType,Mode> >
|
||||
|
||||
template<typename MatrixType, unsigned int Mode>
|
||||
struct unary_evaluator<TriangularView<MatrixType,Mode>, IndexBased>
|
||||
: evaluator<typename internal::remove_all<MatrixType>::type>
|
||||
: evaluator<internal::remove_all_t<MatrixType>>
|
||||
{
|
||||
typedef TriangularView<MatrixType,Mode> XprType;
|
||||
typedef evaluator<typename internal::remove_all<MatrixType>::type> Base;
|
||||
typedef evaluator<internal::remove_all_t<MatrixType>> Base;
|
||||
EIGEN_DEVICE_FUNC
|
||||
unary_evaluator(const XprType &xpr) : Base(xpr.nestedExpression()) {}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user