diff options
78 files changed, 294 insertions, 294 deletions
diff --git a/Eigen/src/Core/Assign.h b/Eigen/src/Core/Assign.h index 37b0049a2..96451a9e7 100644 --- a/Eigen/src/Core/Assign.h +++ b/Eigen/src/Core/Assign.h @@ -497,7 +497,7 @@ EIGEN_STRONG_INLINE Derived& DenseBase<Derived> ::lazyAssign(const DenseBase<OtherDerived>& other) { enum{ - SameType = internal::is_same_type<typename Derived::Scalar,typename OtherDerived::Scalar>::ret + SameType = internal::is_same<typename Derived::Scalar,typename OtherDerived::Scalar>::value }; EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Derived,OtherDerived) diff --git a/Eigen/src/Core/BandMatrix.h b/Eigen/src/Core/BandMatrix.h index d5c0957ee..d70927e31 100644 --- a/Eigen/src/Core/BandMatrix.h +++ b/Eigen/src/Core/BandMatrix.h @@ -147,9 +147,9 @@ class BandMatrix : public EigenBase<BandMatrix<_Scalar,Rows,Cols,Supers,Subs,Opt : EIGEN_SIZE_MIN_PREFER_DYNAMIC(RowsAtCompileTime, ColsAtCompileTime - ActualIndex)) }; typedef Block<DataType,1, DiagonalSize> BuildType; - typedef typename internal::meta_if<Conjugate, + typedef typename internal::conditional<Conjugate, CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>,BuildType >, - BuildType>::ret Type; + BuildType>::type Type; }; /** \returns a vector expression of the \a N -th sub or super diagonal */ diff --git a/Eigen/src/Core/Block.h b/Eigen/src/Core/Block.h index 76fb46e25..3ab242537 100644 --- a/Eigen/src/Core/Block.h +++ b/Eigen/src/Core/Block.h @@ -67,7 +67,7 @@ struct traits<Block<XprType, BlockRows, BlockCols, InnerPanel, HasDirectAccess> typedef typename traits<XprType>::StorageKind StorageKind; typedef typename traits<XprType>::XprKind XprKind; typedef typename nested<XprType>::type XprTypeNested; - typedef typename unref<XprTypeNested>::type _XprTypeNested; + typedef typename remove_reference<XprTypeNested>::type _XprTypeNested; enum{ MatrixRows = traits<XprType>::RowsAtCompileTime, MatrixCols = traits<XprType>::ColsAtCompileTime, diff --git a/Eigen/src/Core/CwiseBinaryOp.h b/Eigen/src/Core/CwiseBinaryOp.h index 8e9761640..9b5908532 100644 --- a/Eigen/src/Core/CwiseBinaryOp.h +++ b/Eigen/src/Core/CwiseBinaryOp.h @@ -75,14 +75,14 @@ struct traits<CwiseBinaryOp<BinaryOp, Lhs, Rhs> > typename traits<Rhs>::Index>::type Index; typedef typename Lhs::Nested LhsNested; typedef typename Rhs::Nested RhsNested; - typedef typename unref<LhsNested>::type _LhsNested; - typedef typename unref<RhsNested>::type _RhsNested; + typedef typename remove_reference<LhsNested>::type _LhsNested; + typedef typename remove_reference<RhsNested>::type _RhsNested; enum { LhsCoeffReadCost = _LhsNested::CoeffReadCost, RhsCoeffReadCost = _RhsNested::CoeffReadCost, LhsFlags = _LhsNested::Flags, RhsFlags = _RhsNested::Flags, - SameType = is_same_type<typename _LhsNested::Scalar,typename _RhsNested::Scalar>::ret, + SameType = is_same<typename _LhsNested::Scalar,typename _RhsNested::Scalar>::value, StorageOrdersAgree = (int(Lhs::Flags)&RowMajorBit)==(int(Rhs::Flags)&RowMajorBit), Flags0 = (int(LhsFlags) | int(RhsFlags)) & ( HereditaryBits @@ -108,8 +108,8 @@ struct traits<CwiseBinaryOp<BinaryOp, Lhs, Rhs> > // add together a float matrix and a double matrix. #define EIGEN_CHECK_BINARY_COMPATIBILIY(BINOP,LHS,RHS) \ EIGEN_STATIC_ASSERT((internal::functor_allows_mixing_real_and_complex<BINOP>::ret \ - ? int(internal::is_same_type<typename NumTraits<LHS>::Real, typename NumTraits<RHS>::Real>::ret) \ - : int(internal::is_same_type<LHS, RHS>::ret)), \ + ? int(internal::is_same<typename NumTraits<LHS>::Real, typename NumTraits<RHS>::Real>::value) \ + : int(internal::is_same<LHS, RHS>::value)), \ YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) template<typename BinaryOp, typename Lhs, typename Rhs, typename StorageKind> @@ -132,8 +132,8 @@ class CwiseBinaryOp : internal::no_assignment_operator, typedef typename internal::nested<Lhs>::type LhsNested; typedef typename internal::nested<Rhs>::type RhsNested; - typedef typename internal::unref<LhsNested>::type _LhsNested; - typedef typename internal::unref<RhsNested>::type _RhsNested; + typedef typename internal::remove_reference<LhsNested>::type _LhsNested; + typedef typename internal::remove_reference<RhsNested>::type _RhsNested; EIGEN_STRONG_INLINE CwiseBinaryOp(const Lhs& lhs, const Rhs& rhs, const BinaryOp& func = BinaryOp()) : m_lhs(lhs), m_rhs(rhs), m_functor(func) diff --git a/Eigen/src/Core/CwiseUnaryOp.h b/Eigen/src/Core/CwiseUnaryOp.h index 284eb39b0..7bc813d14 100644 --- a/Eigen/src/Core/CwiseUnaryOp.h +++ b/Eigen/src/Core/CwiseUnaryOp.h @@ -55,7 +55,7 @@ struct traits<CwiseUnaryOp<UnaryOp, XprType> > UnaryOp(typename XprType::Scalar) >::type Scalar; typedef typename XprType::Nested XprTypeNested; - typedef typename unref<XprTypeNested>::type _XprTypeNested; + typedef typename remove_reference<XprTypeNested>::type _XprTypeNested; enum { Flags = _XprTypeNested::Flags & ( HereditaryBits | LinearAccessBit | AlignedBit diff --git a/Eigen/src/Core/DenseBase.h b/Eigen/src/Core/DenseBase.h index f8ad160bf..6e028cfac 100644 --- a/Eigen/src/Core/DenseBase.h +++ b/Eigen/src/Core/DenseBase.h @@ -395,8 +395,8 @@ template<typename Derived> class DenseBase inline const NestByValue<Derived> nestByValue() const; inline const ForceAlignedAccess<Derived> forceAlignedAccess() const; inline ForceAlignedAccess<Derived> forceAlignedAccess(); - template<bool Enable> inline const typename internal::meta_if<Enable,ForceAlignedAccess<Derived>,Derived&>::ret forceAlignedAccessIf() const; - template<bool Enable> inline typename internal::meta_if<Enable,ForceAlignedAccess<Derived>,Derived&>::ret forceAlignedAccessIf(); + template<bool Enable> inline const typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type forceAlignedAccessIf() const; + template<bool Enable> inline typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type forceAlignedAccessIf(); Scalar sum() const; Scalar mean() const; @@ -482,7 +482,7 @@ template<typename Derived> class DenseBase // disable the use of evalTo for dense objects with a nice compilation error template<typename Dest> inline void evalTo(Dest& ) const { - EIGEN_STATIC_ASSERT((internal::is_same_type<Dest,void>::ret),THE_EVAL_EVALTO_FUNCTION_SHOULD_NEVER_BE_CALLED_FOR_DENSE_OBJECTS); + EIGEN_STATIC_ASSERT((internal::is_same<Dest,void>::value),THE_EVAL_EVALTO_FUNCTION_SHOULD_NEVER_BE_CALLED_FOR_DENSE_OBJECTS); } protected: diff --git a/Eigen/src/Core/DenseCoeffsBase.h b/Eigen/src/Core/DenseCoeffsBase.h index d39aafc08..9de9ae280 100644 --- a/Eigen/src/Core/DenseCoeffsBase.h +++ b/Eigen/src/Core/DenseCoeffsBase.h @@ -44,10 +44,10 @@ class DenseCoeffsBase<Derived,ReadOnlyAccessors> : public EigenBase<Derived> typedef typename internal::traits<Derived>::Index Index; typedef typename internal::traits<Derived>::Scalar Scalar; typedef typename internal::packet_traits<Scalar>::type PacketScalar; - typedef typename internal::meta_if<bool(internal::traits<Derived>::Flags&LvalueBit), + typedef typename internal::conditional<bool(internal::traits<Derived>::Flags&LvalueBit), const Scalar&, - typename internal::meta_if<internal::is_arithmetic<Scalar>::ret, Scalar, const Scalar>::ret - >::ret CoeffReturnType; + typename internal::conditional<internal::is_arithmetic<Scalar>::value, Scalar, const Scalar>::type + >::type CoeffReturnType; typedef typename internal::makeconst_return_type<typename internal::packet_traits<Scalar>::type>::type PacketReturnType; typedef EigenBase<Derived> Base; diff --git a/Eigen/src/Core/Diagonal.h b/Eigen/src/Core/Diagonal.h index 1a86b4e39..158bc6df7 100644 --- a/Eigen/src/Core/Diagonal.h +++ b/Eigen/src/Core/Diagonal.h @@ -50,7 +50,7 @@ struct traits<Diagonal<MatrixType,DiagIndex> > : traits<MatrixType> { typedef typename nested<MatrixType>::type MatrixTypeNested; - typedef typename unref<MatrixTypeNested>::type _MatrixTypeNested; + typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested; typedef typename MatrixType::StorageKind StorageKind; enum { AbsDiagIndex = DiagIndex<0 ? -DiagIndex : DiagIndex, // only used if DiagIndex != Dynamic diff --git a/Eigen/src/Core/DiagonalProduct.h b/Eigen/src/Core/DiagonalProduct.h index 6c9b62920..de0c6ed11 100644 --- a/Eigen/src/Core/DiagonalProduct.h +++ b/Eigen/src/Core/DiagonalProduct.h @@ -41,7 +41,7 @@ struct traits<DiagonalProduct<MatrixType, DiagonalType, ProductOrder> > _StorageOrder = MatrixType::Flags & RowMajorBit ? RowMajor : ColMajor, _PacketOnDiag = !((int(_StorageOrder) == RowMajor && int(ProductOrder) == OnTheLeft) ||(int(_StorageOrder) == ColMajor && int(ProductOrder) == OnTheRight)), - _SameTypes = is_same_type<typename MatrixType::Scalar, typename DiagonalType::Scalar>::ret, + _SameTypes = is_same<typename MatrixType::Scalar, typename DiagonalType::Scalar>::value, // FIXME currently we need same types, but in the future the next rule should be the one //_Vectorizable = bool(int(MatrixType::Flags)&PacketAccessBit) && ((!_PacketOnDiag) || (_SameTypes && bool(int(DiagonalType::Flags)&PacketAccessBit))), _Vectorizable = bool(int(MatrixType::Flags)&PacketAccessBit) && _SameTypes && ((!_PacketOnDiag) || (bool(int(DiagonalType::Flags)&PacketAccessBit))), @@ -83,21 +83,21 @@ class DiagonalProduct : internal::no_assignment_operator, }; const Index indexInDiagonalVector = ProductOrder == OnTheLeft ? row : col; - return packet_impl<LoadMode>(row,col,indexInDiagonalVector,typename internal::meta_if< + return packet_impl<LoadMode>(row,col,indexInDiagonalVector,typename internal::conditional< ((int(StorageOrder) == RowMajor && int(ProductOrder) == OnTheLeft) - ||(int(StorageOrder) == ColMajor && int(ProductOrder) == OnTheRight)), internal::meta_true, internal::meta_false>::ret()); + ||(int(StorageOrder) == ColMajor && int(ProductOrder) == OnTheRight)), internal::true_type, internal::false_type>::type()); } protected: template<int LoadMode> - EIGEN_STRONG_INLINE PacketScalar packet_impl(Index row, Index col, Index id, internal::meta_true) const + EIGEN_STRONG_INLINE PacketScalar packet_impl(Index row, Index col, Index id, internal::true_type) const { return internal::pmul(m_matrix.template packet<LoadMode>(row, col), internal::pset1<PacketScalar>(m_diagonal.diagonal().coeff(id))); } template<int LoadMode> - EIGEN_STRONG_INLINE PacketScalar packet_impl(Index row, Index col, Index id, internal::meta_false) const + EIGEN_STRONG_INLINE PacketScalar packet_impl(Index row, Index col, Index id, internal::false_type) const { enum { InnerSize = (MatrixType::Flags & RowMajorBit) ? MatrixType::ColsAtCompileTime : MatrixType::RowsAtCompileTime, diff --git a/Eigen/src/Core/Dot.h b/Eigen/src/Core/Dot.h index 9e02f1bf3..74d5652c1 100644 --- a/Eigen/src/Core/Dot.h +++ b/Eigen/src/Core/Dot.h @@ -76,7 +76,7 @@ MatrixBase<Derived>::dot(const MatrixBase<OtherDerived>& other) const EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived) - EIGEN_STATIC_ASSERT((internal::is_same_type<Scalar, typename OtherDerived::Scalar>::ret), + EIGEN_STATIC_ASSERT((internal::is_same<Scalar, typename OtherDerived::Scalar>::value), YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) eigen_assert(size() == other.size()); @@ -117,7 +117,7 @@ inline const typename MatrixBase<Derived>::PlainObject MatrixBase<Derived>::normalized() const { typedef typename internal::nested<Derived>::type Nested; - typedef typename internal::unref<Nested>::type _Nested; + typedef typename internal::remove_reference<Nested>::type _Nested; _Nested n(derived()); return n / n.norm(); } diff --git a/Eigen/src/Core/Flagged.h b/Eigen/src/Core/Flagged.h index 8d2207a7f..208f51afb 100644 --- a/Eigen/src/Core/Flagged.h +++ b/Eigen/src/Core/Flagged.h @@ -56,8 +56,8 @@ template<typename ExpressionType, unsigned int Added, unsigned int Removed> clas typedef MatrixBase<Flagged> Base; EIGEN_DENSE_PUBLIC_INTERFACE(Flagged) - typedef typename internal::meta_if<internal::must_nest_by_value<ExpressionType>::ret, - ExpressionType, const ExpressionType&>::ret ExpressionTypeNested; + typedef typename internal::conditional<internal::must_nest_by_value<ExpressionType>::ret, + ExpressionType, const ExpressionType&>::type ExpressionTypeNested; typedef typename ExpressionType::InnerIterator InnerIterator; inline Flagged(const ExpressionType& matrix) : m_matrix(matrix) {} diff --git a/Eigen/src/Core/ForceAlignedAccess.h b/Eigen/src/Core/ForceAlignedAccess.h index 727b87e64..2a6f1cf4e 100644 --- a/Eigen/src/Core/ForceAlignedAccess.h +++ b/Eigen/src/Core/ForceAlignedAccess.h @@ -137,7 +137,7 @@ MatrixBase<Derived>::forceAlignedAccess() */ template<typename Derived> template<bool Enable> -inline typename internal::makeconst<typename internal::meta_if<Enable,ForceAlignedAccess<Derived>,Derived&>::ret>::type +inline typename internal::add_const<typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type>::type MatrixBase<Derived>::forceAlignedAccessIf() const { return derived(); @@ -148,7 +148,7 @@ MatrixBase<Derived>::forceAlignedAccessIf() const */ template<typename Derived> template<bool Enable> -inline typename internal::meta_if<Enable,ForceAlignedAccess<Derived>,Derived&>::ret +inline typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type MatrixBase<Derived>::forceAlignedAccessIf() { return derived(); diff --git a/Eigen/src/Core/Functors.h b/Eigen/src/Core/Functors.h index 6716ccae8..f2aaea145 100644 --- a/Eigen/src/Core/Functors.h +++ b/Eigen/src/Core/Functors.h @@ -59,7 +59,7 @@ struct functor_traits<scalar_sum_op<Scalar> > { */ template<typename LhsScalar,typename RhsScalar> struct scalar_product_op { enum { - Vectorizable = is_same_type<LhsScalar,RhsScalar>::ret && packet_traits<LhsScalar>::HasMul && packet_traits<RhsScalar>::HasMul + Vectorizable = is_same<LhsScalar,RhsScalar>::value && packet_traits<LhsScalar>::HasMul && packet_traits<RhsScalar>::HasMul }; typedef typename scalar_product_traits<LhsScalar,RhsScalar>::ReturnType result_type; EIGEN_EMPTY_STRUCT_CTOR(scalar_product_op) @@ -303,7 +303,7 @@ struct scalar_cast_op { }; template<typename Scalar, typename NewType> struct functor_traits<scalar_cast_op<Scalar,NewType> > -{ enum { Cost = is_same_type<Scalar, NewType>::ret ? 0 : NumTraits<NewType>::AddCost, PacketAccess = false }; }; +{ enum { Cost = is_same<Scalar, NewType>::value ? 0 : NumTraits<NewType>::AddCost, PacketAccess = false }; }; /** \internal * \brief Template functor to extract the real part of a complex @@ -419,7 +419,7 @@ struct scalar_multiple_op { EIGEN_STRONG_INLINE Scalar operator() (const Scalar& a) const { return a * m_other; } EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const { return internal::pmul(a, pset1<Packet>(m_other)); } - typename makeconst<typename NumTraits<Scalar>::Nested>::type m_other; + typename add_const<typename NumTraits<Scalar>::Nested>::type m_other; }; template<typename Scalar> struct functor_traits<scalar_multiple_op<Scalar> > @@ -431,7 +431,7 @@ struct scalar_multiple2_op { EIGEN_STRONG_INLINE scalar_multiple2_op(const scalar_multiple2_op& other) : m_other(other.m_other) { } EIGEN_STRONG_INLINE scalar_multiple2_op(const Scalar2& other) : m_other(other) { } EIGEN_STRONG_INLINE result_type operator() (const Scalar1& a) const { return a * m_other; } - typename makeconst<typename NumTraits<Scalar2>::Nested>::type m_other; + typename add_const<typename NumTraits<Scalar2>::Nested>::type m_other; }; template<typename Scalar1,typename Scalar2> struct functor_traits<scalar_multiple2_op<Scalar1,Scalar2> > @@ -458,7 +458,7 @@ struct scalar_quotient1_impl<Scalar,true> { EIGEN_STRONG_INLINE scalar_quotient1_impl(const scalar_quotient1_impl& other) : m_other(other.m_other) { } EIGEN_STRONG_INLINE scalar_quotient1_impl(const Scalar& other) : m_other(other) {} EIGEN_STRONG_INLINE Scalar operator() (const Scalar& a) const { return a / m_other; } - typename makeconst<typename NumTraits<Scalar>::Nested>::type m_other; + typename add_const<typename NumTraits<Scalar>::Nested>::type m_other; }; template<typename Scalar> struct functor_traits<scalar_quotient1_impl<Scalar,true> > diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index 600545b95..990509d48 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -163,7 +163,7 @@ struct real_ref_retval }; template<typename Scalar> -inline typename makeconst< EIGEN_MATHFUNC_RETVAL(real_ref, Scalar) >::type real_ref(const Scalar& x) +inline typename add_const< EIGEN_MATHFUNC_RETVAL(real_ref, Scalar) >::type real_ref(const Scalar& x) { return real_ref_impl<Scalar>::run(x); } @@ -215,7 +215,7 @@ struct imag_ref_retval }; template<typename Scalar> -inline typename makeconst< EIGEN_MATHFUNC_RETVAL(imag_ref, Scalar) >::type imag_ref(const Scalar& x) +inline typename add_const< EIGEN_MATHFUNC_RETVAL(imag_ref, Scalar) >::type imag_ref(const Scalar& x) { return imag_ref_impl<Scalar>::run(x); } diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index 5ef723e8c..a1b84bd94 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -127,10 +127,10 @@ template<typename Derived> class MatrixBase /** \internal Represents a matrix with all coefficients equal to one another*/ typedef CwiseNullaryOp<internal::scalar_constant_op<Scalar>,Derived> ConstantReturnType; /** \internal the return type of MatrixBase::adjoint() */ - typedef typename internal::meta_if<NumTraits<Scalar>::IsComplex, + typedef typename internal::conditional<NumTraits<Scalar>::IsComplex, CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, Eigen::Transpose<Derived> >, Transpose<Derived> - >::ret AdjointReturnType; + >::type AdjointReturnType; /** \internal Return type of eigenvalues() */ typedef Matrix<std::complex<RealScalar>, internal::traits<Derived>::ColsAtCompileTime, 1, ColMajor> EigenvaluesReturnType; /** \internal the return type of identity */ @@ -277,8 +277,8 @@ template<typename Derived> class MatrixBase inline const ForceAlignedAccess<Derived> forceAlignedAccess() const; inline ForceAlignedAccess<Derived> forceAlignedAccess(); - template<bool Enable> inline typename internal::makeconst<typename internal::meta_if<Enable,ForceAlignedAccess<Derived>,Derived&>::ret>::type forceAlignedAccessIf() const; - template<bool Enable> inline typename internal::meta_if<Enable,ForceAlignedAccess<Derived>,Derived&>::ret forceAlignedAccessIf(); + template<bool Enable> inline typename internal::add_const<typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type>::type forceAlignedAccessIf() const; + template<bool Enable> inline typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type forceAlignedAccessIf(); Scalar trace() const; diff --git a/Eigen/src/Core/NumTraits.h b/Eigen/src/Core/NumTraits.h index fb7b0b0c4..edc2ad2c4 100644 --- a/Eigen/src/Core/NumTraits.h +++ b/Eigen/src/Core/NumTraits.h @@ -71,11 +71,11 @@ template<typename T> struct GenericNumTraits }; typedef T Real; - typedef typename internal::meta_if< + typedef typename internal::conditional< IsInteger, - typename internal::meta_if<sizeof(T)<=2, float, double>::ret, + typename internal::conditional<sizeof(T)<=2, float, double>::type, T - >::ret NonInteger; + >::type NonInteger; typedef T Nested; inline static Real epsilon() { return std::numeric_limits<T>::epsilon(); } diff --git a/Eigen/src/Core/PermutationMatrix.h b/Eigen/src/Core/PermutationMatrix.h index 9e99b6f91..e5e5d593a 100644 --- a/Eigen/src/Core/PermutationMatrix.h +++ b/Eigen/src/Core/PermutationMatrix.h @@ -353,7 +353,7 @@ struct permut_matrix_product_retval { const int n = Side==OnTheLeft ? rows() : cols(); - if(is_same_type<MatrixTypeNestedCleaned,Dest>::ret && extract_data(dst) == extract_data(m_matrix)) + if(is_same<MatrixTypeNestedCleaned,Dest>::value && extract_data(dst) == extract_data(m_matrix)) { // apply the permutation inplace Matrix<bool,PermutationType::RowsAtCompileTime,1,0,PermutationType::MaxRowsAtCompileTime> mask(m_permutation.size()); diff --git a/Eigen/src/Core/PlainObjectBase.h b/Eigen/src/Core/PlainObjectBase.h index 0848475b3..6bb42f1c9 100644 --- a/Eigen/src/Core/PlainObjectBase.h +++ b/Eigen/src/Core/PlainObjectBase.h @@ -460,15 +460,15 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type template<typename OtherDerived> EIGEN_STRONG_INLINE Derived& _set(const DenseBase<OtherDerived>& other) { - _set_selector(other.derived(), typename internal::meta_if<static_cast<bool>(int(OtherDerived::Flags) & EvalBeforeAssigningBit), internal::meta_true, internal::meta_false>::ret()); + _set_selector(other.derived(), typename internal::conditional<static_cast<bool>(int(OtherDerived::Flags) & EvalBeforeAssigningBit), internal::true_type, internal::false_type>::type()); return this->derived(); } template<typename OtherDerived> - EIGEN_STRONG_INLINE void _set_selector(const OtherDerived& other, const internal::meta_true&) { _set_noalias(other.eval()); } + EIGEN_STRONG_INLINE void _set_selector(const OtherDerived& other, const internal::true_type&) { _set_noalias(other.eval()); } template<typename OtherDerived> - EIGEN_STRONG_INLINE void _set_selector(const OtherDerived& other, const internal::meta_false&) { _set_noalias(other); } + EIGEN_STRONG_INLINE void _set_selector(const OtherDerived& other, const internal::false_type&) { _set_noalias(other); } /** \internal Like _set() but additionally makes the assumption that no aliasing effect can happen (which * is the case when creating a new matrix) so one can enforce lazy evaluation. @@ -511,7 +511,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type template<typename OtherDerived> void _swap(DenseBase<OtherDerived> EIGEN_REF_TO_TEMPORARY other) { - enum { SwapPointers = internal::is_same_type<Derived, OtherDerived>::ret && Base::SizeAtCompileTime==Dynamic }; + enum { SwapPointers = internal::is_same<Derived, OtherDerived>::value && Base::SizeAtCompileTime==Dynamic }; internal::matrix_swap_impl<Derived, OtherDerived, bool(SwapPointers)>::run(this->derived(), other.const_cast_derived()); } diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h index 3bb73fa5f..c04701492 100644 --- a/Eigen/src/Core/Product.h +++ b/Eigen/src/Core/Product.h @@ -202,7 +202,7 @@ class GeneralProduct<Lhs, Rhs, InnerProduct> public: GeneralProduct(const Lhs& lhs, const Rhs& rhs) { - EIGEN_STATIC_ASSERT((internal::is_same_type<typename Lhs::RealScalar, typename Rhs::RealScalar>::ret), + EIGEN_STATIC_ASSERT((internal::is_same<typename Lhs::RealScalar, typename Rhs::RealScalar>::value), YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) Base::coeffRef(0,0) = (lhs.transpose().cwiseProduct(rhs)).sum(); @@ -239,7 +239,7 @@ class GeneralProduct<Lhs, Rhs, OuterProduct> GeneralProduct(const Lhs& lhs, const Rhs& rhs) : Base(lhs,rhs) { - EIGEN_STATIC_ASSERT((internal::is_same_type<typename Lhs::RealScalar, typename Rhs::RealScalar>::ret), + EIGEN_STATIC_ASSERT((internal::is_same<typename Lhs::RealScalar, typename Rhs::RealScalar>::value), YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) } @@ -312,12 +312,12 @@ class GeneralProduct<Lhs, Rhs, GemvProduct> GeneralProduct(const Lhs& lhs, const Rhs& rhs) : Base(lhs,rhs) { -// EIGEN_STATIC_ASSERT((internal::is_same_type<typename Lhs::Scalar, typename Rhs::Scalar>::ret), +// EIGEN_STATIC_ASSERT((internal::is_same<typename Lhs::Scalar, typename Rhs::Scalar>::value), // YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) } enum { Side = Lhs::IsVectorAtCompileTime ? OnTheLeft : OnTheRight }; - typedef typename internal::meta_if<int(Side)==OnTheRight,_LhsNested,_RhsNested>::ret MatrixType; + typedef typename internal::conditional<int(Side)==OnTheRight,_LhsNested,_RhsNested>::type MatrixType; template<typename Dest> void scaleAndAddTo(Dest& dst, Scalar alpha) const { diff --git a/Eigen/src/Core/ProductBase.h b/Eigen/src/Core/ProductBase.h index 87702f4db..d45819132 100644 --- a/Eigen/src/Core/ProductBase.h +++ b/Eigen/src/Core/ProductBase.h @@ -183,7 +183,7 @@ operator*(const ProductBase<Derived,Lhs,Rhs>& prod, typename Derived::Scalar x) { return ScaledProduct<Derived>(prod.derived(), x); } template<typename Derived,typename Lhs,typename Rhs> -typename internal::enable_if<!internal::is_same_type<typename Derived::Scalar,typename Derived::RealScalar>::ret, +typename internal::enable_if<!internal::is_same<typename Derived::Scalar,typename Derived::RealScalar>::value, const ScaledProduct<Derived> >::type operator*(const ProductBase<Derived,Lhs,Rhs>& prod, typename Derived::RealScalar x) { return ScaledProduct<Derived>(prod.derived(), x); } @@ -195,7 +195,7 @@ operator*(typename Derived::Scalar x,const ProductBase<Derived,Lhs,Rhs>& prod) { return ScaledProduct<Derived>(prod.derived(), x); } template<typename Derived,typename Lhs,typename Rhs> -typename internal::enable_if<!internal::is_same_type<typename Derived::Scalar,typename Derived::RealScalar>::ret, +typename internal::enable_if<!internal::is_same<typename Derived::Scalar,typename Derived::RealScalar>::value, const ScaledProduct<Derived> >::type operator*(typename Derived::RealScalar x,const ProductBase<Derived,Lhs,Rhs>& prod) { return ScaledProduct<Derived>(prod.derived(), x); } diff --git a/Eigen/src/Core/Replicate.h b/Eigen/src/Core/Replicate.h index d5022c2cd..87fcfccdd 100644 --- a/Eigen/src/Core/Replicate.h +++ b/Eigen/src/Core/Replicate.h @@ -49,7 +49,7 @@ struct traits<Replicate<MatrixType,RowFactor,ColFactor> > typedef typename traits<MatrixType>::StorageKind StorageKind; typedef typename traits<MatrixType>::XprKind XprKind; typedef typename nested<MatrixType>::type MatrixTypeNested; - typedef typename unref<MatrixTypeNested>::type _MatrixTypeNested; + typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested; enum { RowsAtCompileTime = RowFactor==Dynamic || int(MatrixType::RowsAtCompileTime)==Dynamic ? Dynamic @@ -81,7 +81,7 @@ template<typename MatrixType,int RowFactor,int ColFactor> class Replicate inline explicit Replicate(const OriginalMatrixType& matrix) : m_matrix(matrix), m_rowFactor(RowFactor), m_colFactor(ColFactor) { - EIGEN_STATIC_ASSERT((internal::is_same_type<MatrixType,OriginalMatrixType>::ret), + EIGEN_STATIC_ASSERT((internal::is_same<MatrixType,OriginalMatrixType>::value), THE_MATRIX_OR_EXPRESSION_THAT_YOU_PASSED_DOES_NOT_HAVE_THE_EXPECTED_TYPE) eigen_assert(RowFactor!=Dynamic && ColFactor!=Dynamic); } @@ -90,7 +90,7 @@ template<typename MatrixType,int RowFactor,int ColFactor> class Replicate inline Replicate(const OriginalMatrixType& matrix, int rowFactor, int colFactor) : m_matrix(matrix), m_rowFactor(rowFactor), m_colFactor(colFactor) { - EIGEN_STATIC_ASSERT((internal::is_same_type<MatrixType,OriginalMatrixType>::ret), + EIGEN_STATIC_ASSERT((internal::is_same<MatrixType,OriginalMatrixType>::value), THE_MATRIX_OR_EXPRESSION_THAT_YOU_PASSED_DOES_NOT_HAVE_THE_EXPECTED_TYPE) } diff --git a/Eigen/src/Core/Reverse.h b/Eigen/src/Core/Reverse.h index 13fdc50a7..ed32b17fc 100644 --- a/Eigen/src/Core/Reverse.h +++ b/Eigen/src/Core/Reverse.h @@ -51,7 +51,7 @@ struct traits<Reverse<MatrixType, Direction> > typedef typename traits<MatrixType>::StorageKind StorageKind; typedef typename traits<MatrixType>::XprKind XprKind; typedef typename nested<MatrixType>::type MatrixTypeNested; - typedef typename unref<MatrixTypeNested>::type _MatrixTypeNested; + typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested; enum { RowsAtCompileTime = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime, diff --git a/Eigen/src/Core/SelfAdjointView.h b/Eigen/src/Core/SelfAdjointView.h index 489240dd9..623cca027 100644 --- a/Eigen/src/Core/SelfAdjointView.h +++ b/Eigen/src/Core/SelfAdjointView.h @@ -46,7 +46,7 @@ template<typename MatrixType, unsigned int UpLo> struct traits<SelfAdjointView<MatrixType, UpLo> > : traits<MatrixType> { typedef typename nested<MatrixType>::type MatrixTypeNested; - typedef typename unref<MatrixTypeNested>::type _MatrixTypeNested; + typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested; typedef MatrixType ExpressionType; enum { Mode = UpLo | SelfAdjoint, diff --git a/Eigen/src/Core/SelfCwiseBinaryOp.h b/Eigen/src/Core/SelfCwiseBinaryOp.h index 9a649c1ee..213983588 100644 --- a/Eigen/src/Core/SelfCwiseBinaryOp.h +++ b/Eigen/src/Core/SelfCwiseBinaryOp.h @@ -173,9 +173,9 @@ inline Derived& DenseBase<Derived>::operator*=(const Scalar& other) template<typename Derived> inline Derived& DenseBase<Derived>::operator/=(const Scalar& other) { - typedef typename internal::meta_if<NumTraits<Scalar>::IsInteger, + typedef typename internal::conditional<NumTraits<Scalar>::IsInteger, internal::scalar_quotient_op<Scalar>, - internal::scalar_product_op<Scalar> >::ret BinOp; + internal::scalar_product_op<Scalar> >::type BinOp; typedef typename Derived::PlainObject PlainObject; SelfCwiseBinaryOp<BinOp, Derived, typename PlainObject::ConstantReturnType> tmp(derived()); tmp = PlainObject::Constant(rows(),cols(), NumTraits<Scalar>::IsInteger ? other : Scalar(1)/other); diff --git a/Eigen/src/Core/SolveTriangular.h b/Eigen/src/Core/SolveTriangular.h index 0b9d3db9d..abbf57553 100644 --- a/Eigen/src/Core/SolveTriangular.h +++ b/Eigen/src/Core/SolveTriangular.h @@ -256,11 +256,11 @@ void TriangularView<MatrixType,Mode>::solveInPlace(const MatrixBase<OtherDerived eigen_assert(Mode & (Upper|Lower)); enum { copy = internal::traits<OtherDerived>::Flags & RowMajorBit && OtherDerived::IsVectorAtCompileTime }; - typedef typename internal::meta_if<copy, - typename internal::plain_matrix_type_column_major<OtherDerived>::type, OtherDerived&>::ret OtherCopy; + typedef typename internal::conditional<copy, + typename internal::plain_matrix_type_column_major<OtherDerived>::type, OtherDerived&>::type OtherCopy; OtherCopy otherCopy(other); - internal::triangular_solver_selector<MatrixType, typename internal::unref<OtherCopy>::type, + internal::triangular_solver_selector<MatrixType, typename internal::remove_reference<OtherCopy>::type, Side, Mode>::run(nestedExpression(), otherCopy); if (copy) diff --git a/Eigen/src/Core/Transpose.h b/Eigen/src/Core/Transpose.h index a011f7df3..b3159a3c5 100644 --- a/Eigen/src/Core/Transpose.h +++ b/Eigen/src/Core/Transpose.h @@ -46,7 +46,7 @@ struct traits<Transpose<MatrixType> > : traits<MatrixType> { typedef typename MatrixType::Scalar Scalar; typedef typename nested<MatrixType>::type MatrixTypeNested; - typedef typename unref<MatrixTypeNested>::type _MatrixTypeNested; + typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested; typedef typename traits<MatrixType>::StorageKind StorageKind; typedef typename traits<MatrixType>::XprKind XprKind; enum { diff --git a/Eigen/src/Core/Transpositions.h b/Eigen/src/Core/Transpositions.h index b7c3c339f..32a9f1fec 100644 --- a/Eigen/src/Core/Transpositions.h +++ b/Eigen/src/Core/Transpositions.h @@ -240,7 +240,7 @@ struct transposition_matrix_product_retval const int size = m_transpositions.size(); Index j = 0; - if(!(is_same_type<MatrixTypeNestedCleaned,Dest>::ret && extract_data(dst) == extract_data(m_matrix))) + if(!(is_same<MatrixTypeNestedCleaned,Dest>::value && extract_data(dst) == extract_data(m_matrix))) dst = m_matrix; for(int k=(Transposed?size-1:0) ; Transposed?k>=0:k<size ; Transposed?--k:++k) diff --git a/Eigen/src/Core/TriangularMatrix.h b/Eigen/src/Core/TriangularMatrix.h index dc540f9bc..76f07b892 100644 --- a/Eigen/src/Core/TriangularMatrix.h +++ b/Eigen/src/Core/TriangularMatrix.h @@ -134,7 +134,7 @@ template<typename MatrixType, unsigned int _Mode> struct traits<TriangularView<MatrixType, _Mode> > : traits<MatrixType> { typedef typename nested<MatrixType>::type MatrixTypeNested; - typedef typename unref<MatrixTypeNested>::type _MatrixTypeNested; + typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested; typedef MatrixType ExpressionType; enum { Mode = _Mode, diff --git a/Eigen/src/Core/VectorwiseOp.h b/Eigen/src/Core/VectorwiseOp.h index 4c794d5b5..8cd516479 100644 --- a/Eigen/src/Core/VectorwiseOp.h +++ b/Eigen/src/Core/VectorwiseOp.h @@ -182,8 +182,8 @@ template<typename ExpressionType, int Direction> class VectorwiseOp typedef typename ExpressionType::Scalar Scalar; typedef typename ExpressionType::RealScalar RealScalar; typedef typename ExpressionType::Index Index; - typedef typename internal::meta_if<internal::must_nest_by_value<ExpressionType>::ret, - ExpressionType, const ExpressionType&>::ret ExpressionTypeNested; + typedef typename internal::conditional<internal::must_nest_by_value<ExpressionType>::ret, + ExpressionType, const ExpressionType&>::type ExpressionTypeNested; template<template<typename _Scalar> class Functor, typename Scalar=typename internal::traits<ExpressionType>::Scalar> struct ReturnType @@ -211,9 +211,9 @@ template<typename ExpressionType, int Direction> class VectorwiseOp /** \internal * \returns the i-th subvector according to the \c Direction */ - typedef typename internal::meta_if<Direction==Vertical, + typedef typename internal::conditional<Direction==Vertical, typename ExpressionType::ColXpr, - typename ExpressionType::RowXpr>::ret SubVector; + typename ExpressionType::RowXpr>::type SubVector; SubVector subVector(Index i) { return SubVector(m_matrix.derived(),i); diff --git a/Eigen/src/Core/arch/SSE/PacketMath.h b/Eigen/src/Core/arch/SSE/PacketMath.h index 98a5a3426..5b1847252 100644 --- a/Eigen/src/Core/arch/SSE/PacketMath.h +++ b/Eigen/src/Core/arch/SSE/PacketMath.h @@ -39,9 +39,9 @@ typedef __m128 Packet4f; typedef __m128i Packet4i; typedef __m128d Packet2d; -template<> struct is_arithmetic<__m128> { enum { ret = true }; }; -template<> struct is_arithmetic<__m128i> { enum { ret = true }; }; -template<> struct is_arithmetic<__m128d> { enum { ret = true }; }; +template<> struct is_arithmetic<__m128> { enum { value = true }; }; +template<> struct is_arithmetic<__m128i> { enum { value = true }; }; +template<> struct is_arithmetic<__m128d> { enum { value = true }; }; #define vec4f_swizzle1(v,p,q,r,s) \ (_mm_castsi128_ps(_mm_shuffle_epi32( _mm_castps_si128(v), ((s)<<6|(r)<<4|(q)<<2|(p))))) diff --git a/Eigen/src/Core/products/CoeffBasedProduct.h b/Eigen/src/Core/products/CoeffBasedProduct.h index e1f19d787..97cdddcdf 100644 --- a/Eigen/src/Core/products/CoeffBasedProduct.h +++ b/Eigen/src/Core/products/CoeffBasedProduct.h @@ -75,7 +75,7 @@ struct traits<CoeffBasedProduct<LhsNested,RhsNested,NestingFlags> > LhsRowMajor = LhsFlags & RowMajorBit, RhsRowMajor = RhsFlags & RowMajorBit, - SameType = is_same_type<typename _LhsNested::Scalar,typename _RhsNested::Scalar>::ret, + SameType = is_same<typename _LhsNested::Scalar,typename _RhsNested::Scalar>::value, CanVectorizeRhs = RhsRowMajor && (RhsFlags & PacketAccessBit) && (ColsAtCompileTime == Dynamic @@ -162,7 +162,7 @@ class CoeffBasedProduct { // we don't allow taking products of matrices of different real types, as that wouldn't be vectorizable. // We still allow to mix T and complex<T>. - EIGEN_STATIC_ASSERT((internal::is_same_type<typename Lhs::RealScalar, typename Rhs::RealScalar>::ret), + EIGEN_STATIC_ASSERT((internal::is_same<typename Lhs::RealScalar, typename Rhs::RealScalar>::value), YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) eigen_assert(lhs.cols() == rhs.rows() && "invalid matrix product" diff --git a/Eigen/src/Core/products/GeneralBlockPanelKernel.h b/Eigen/src/Core/products/GeneralBlockPanelKernel.h index 94ed792f7..074534861 100644 --- a/Eigen/src/Core/products/GeneralBlockPanelKernel.h +++ b/Eigen/src/Core/products/GeneralBlockPanelKernel.h @@ -185,9 +185,9 @@ public: typedef typename packet_traits<RhsScalar>::type _RhsPacket; typedef typename packet_traits<ResScalar>::type _ResPacket; - typedef typename meta_if<Vectorizable,_LhsPacket,LhsScalar>::ret LhsPacket; - typedef typename meta_if<Vectorizable,_RhsPacket,RhsScalar>::ret RhsPacket; - typedef typename meta_if<Vectorizable,_ResPacket,ResScalar>::ret ResPacket; + typedef typename conditional<Vectorizable,_LhsPacket,LhsScalar>::type LhsPacket; + typedef typename conditional<Vectorizable,_RhsPacket,RhsScalar>::type RhsPacket; + typedef typename conditional<Vectorizable,_ResPacket,ResScalar>::type ResPacket; typedef ResPacket AccPacket; @@ -256,9 +256,9 @@ public: typedef typename packet_traits<RhsScalar>::type _RhsPacket; typedef typename packet_traits<ResScalar>::type _ResPacket; - typedef typename meta_if<Vectorizable,_LhsPacket,LhsScalar>::ret LhsPacket; - typedef typename meta_if<Vectorizable,_RhsPacket,RhsScalar>::ret RhsPacket; - typedef typename meta_if<Vectorizable,_ResPacket,ResScalar>::ret ResPacket; + typedef typename conditional<Vectorizable,_LhsPacket,LhsScalar>::type LhsPacket; + typedef typename conditional<Vectorizable,_RhsPacket,RhsScalar>::type RhsPacket; + typedef typename conditional<Vectorizable,_ResPacket,ResScalar>::type ResPacket; typedef ResPacket AccPacket; @@ -285,15 +285,15 @@ public: EIGEN_STRONG_INLINE void madd(const LhsPacket& a, const RhsPacket& b, AccPacket& c, RhsPacket& tmp) const { - madd_impl(a, b, c, tmp, typename meta_if<Vectorizable,meta_true,meta_false>::ret()); + madd_impl(a, b, c, tmp, typename conditional<Vectorizable,true_type,false_type>::type()); } - EIGEN_STRONG_INLINE void madd_impl(const LhsPacket& a, const RhsPacket& b, AccPacket& c, RhsPacket& tmp, const meta_true&) const + EIGEN_STRONG_INLINE void madd_impl(const LhsPacket& a, const RhsPacket& b, AccPacket& c, RhsPacket& tmp, const true_type&) const { tmp = b; tmp = pmul(a.v,tmp); c.v = padd(c.v,tmp); } - EIGEN_STRONG_INLINE void madd_impl(const LhsScalar& a, const RhsScalar& b, ResScalar& c, RhsScalar& /*tmp*/, const meta_false&) const + EIGEN_STRONG_INLINE void madd_impl(const LhsScalar& a, const RhsScalar& b, ResScalar& c, RhsScalar& /*tmp*/, const false_type&) const { c += a * b; } @@ -340,10 +340,10 @@ public: RealPacket second; }; - typedef typename meta_if<Vectorizable,RealPacket, Scalar>::ret LhsPacket; - typedef typename meta_if<Vectorizable,DoublePacket,Scalar>::ret RhsPacket; - typedef typename meta_if<Vectorizable,ScalarPacket,Scalar>::ret ResPacket; - typedef typename meta_if<Vectorizable,DoublePacket,Scalar>::ret AccPacket; + typedef typename conditional<Vectorizable,RealPacket, Scalar>::type LhsPacket; + typedef typename conditional<Vectorizable,DoublePacket,Scalar>::type RhsPacket; + typedef typename conditional<Vectorizable,ScalarPacket,Scalar>::type ResPacket; + typedef typename conditional<Vectorizable,DoublePacket,Scalar>::type AccPacket; EIGEN_STRONG_INLINE void initAcc(Scalar& p) { p = Scalar(0); } @@ -461,9 +461,9 @@ public: typedef typename packet_traits<RhsScalar>::type _RhsPacket; typedef typename packet_traits<ResScalar>::type _ResPacket; - typedef typename meta_if<Vectorizable,_LhsPacket,LhsScalar>::ret LhsPacket; - typedef typename meta_if<Vectorizable,_RhsPacket,RhsScalar>::ret RhsPacket; - typedef typename meta_if<Vectorizable,_ResPacket,ResScalar>::ret ResPacket; + typedef typename conditional<Vectorizable,_LhsPacket,LhsScalar>::type LhsPacket; + typedef typename conditional<Vectorizable,_RhsPacket,RhsScalar>::type RhsPacket; + typedef typename conditional<Vectorizable,_ResPacket,ResScalar>::type ResPacket; typedef ResPacket AccPacket; @@ -490,15 +490,15 @@ public: EIGEN_STRONG_INLINE void madd(const LhsPacket& a, const RhsPacket& b, AccPacket& c, RhsPacket& tmp) const { - madd_impl(a, b, c, tmp, typename meta_if<Vectorizable,meta_true,meta_false>::ret()); + madd_impl(a, b, c, tmp, typename conditional<Vectorizable,true_type,false_type>::type()); } - EIGEN_STRONG_INLINE void madd_impl(const LhsPacket& a, const RhsPacket& b, AccPacket& c, RhsPacket& tmp, const meta_true&) const + EIGEN_STRONG_INLINE void madd_impl(const LhsPacket& a, const RhsPacket& b, AccPacket& c, RhsPacket& tmp, const true_type&) const { tmp = b; tmp.v = pmul(a,tmp.v); c = padd(c,tmp); } - EIGEN_STRONG_INLINE void madd_impl(const LhsScalar& a, const RhsScalar& b, ResScalar& c, RhsScalar& /*tmp*/, const meta_false&) const + EIGEN_STRONG_INLINE void madd_impl(const LhsScalar& a, const RhsScalar& b, ResScalar& c, RhsScalar& /*tmp*/, const false_type&) const { c += a * b; } diff --git a/Eigen/src/Core/products/GeneralMatrixMatrix.h b/Eigen/src/Core/products/GeneralMatrixMatrix.h index 39e65599d..61e1406e7 100644 --- a/Eigen/src/Core/products/GeneralMatrixMatrix.h +++ b/Eigen/src/Core/products/GeneralMatrixMatrix.h @@ -287,16 +287,16 @@ class level3_blocking template<int StorageOrder, typename _LhsScalar, typename _RhsScalar, int MaxRows, int MaxCols, int MaxDepth> class gemm_blocking_space<StorageOrder,_LhsScalar,_RhsScalar,MaxRows, MaxCols, MaxDepth, true> : public level3_blocking< - typename meta_if<StorageOrder==RowMajor,_RhsScalar,_LhsScalar>::ret, - typename meta_if<StorageOrder==RowMajor,_LhsScalar,_RhsScalar>::ret> + typename conditional<StorageOrder==RowMajor,_RhsScalar,_LhsScalar>::type, + typename conditional<StorageOrder==RowMajor,_LhsScalar,_RhsScalar>::type> { enum { Transpose = StorageOrder==RowMajor, ActualRows = Transpose ? MaxCols : MaxRows, ActualCols = Transpose ? MaxRows : MaxCols }; - typedef typename meta_if<Transpose,_RhsScalar,_LhsScalar>::ret LhsScalar; - typedef typename meta_if<Transpose,_LhsScalar,_RhsScalar>::ret RhsScalar; + typedef typename conditional<Transpose,_RhsScalar,_LhsScalar>::type LhsScalar; + typedef typename conditional<Transpose,_LhsScalar,_RhsScalar>::type RhsScalar; typedef gebp_traits<LhsScalar,RhsScalar> Traits; enum { SizeA = ActualRows * MaxDepth, @@ -329,14 +329,14 @@ class gemm_blocking_space<StorageOrder,_LhsScalar,_RhsScalar,MaxRows, MaxCols, M template<int StorageOrder, typename _LhsScalar, typename _RhsScalar, int MaxRows, int MaxCols, int MaxDepth> class gemm_blocking_space<StorageOrder,_LhsScalar,_RhsScalar,MaxRows, MaxCols, MaxDepth, false> : public level3_blocking< - typename meta_if<StorageOrder==RowMajor,_RhsScalar,_LhsScalar>::ret, - typename meta_if<StorageOrder==RowMajor,_LhsScalar,_RhsScalar>::ret> + typename conditional<StorageOrder==RowMajor,_RhsScalar,_LhsScalar>::type, + typename conditional<StorageOrder==RowMajor,_LhsScalar,_RhsScalar>::type> { enum { Transpose = StorageOrder==RowMajor }; - typedef typename meta_if<Transpose,_RhsScalar,_LhsScalar>::ret LhsScalar; - typedef typename meta_if<Transpose,_LhsScalar,_RhsScalar>::ret RhsScalar; + typedef typename conditional<Transpose,_RhsScalar,_LhsScalar>::type LhsScalar; + typedef typename conditional<Transpose,_LhsScalar,_RhsScalar>::type RhsScalar; typedef gebp_traits<LhsScalar,RhsScalar> Traits; DenseIndex m_sizeA; diff --git a/Eigen/src/Core/products/GeneralMatrixVector.h b/Eigen/src/Core/products/GeneralMatrixVector.h index 41df6170c..540638b5a 100644 --- a/Eigen/src/Core/products/GeneralMatrixVector.h +++ b/Eigen/src/Core/products/GeneralMatrixVector.h @@ -57,9 +57,9 @@ typedef typename packet_traits<LhsScalar>::type _LhsPacket; typedef typename packet_traits<RhsScalar>::type _RhsPacket; typedef typename packet_traits<ResScalar>::type _ResPacket; -typedef typename meta_if<Vectorizable,_LhsPacket,LhsScalar>::ret LhsPacket; -typedef typename meta_if<Vectorizable,_RhsPacket,RhsScalar>::ret RhsPacket; -typedef typename meta_if<Vectorizable,_ResPacket,ResScalar>::ret ResPacket; +typedef typename conditional<Vectorizable,_LhsPacket,LhsScalar>::type LhsPacket; +typedef typename conditional<Vectorizable,_RhsPacket,RhsScalar>::type RhsPacket; +typedef typename conditional<Vectorizable,_ResPacket,ResScalar>::type ResPacket; EIGEN_DONT_INLINE static void run( Index rows, Index cols, @@ -313,9 +313,9 @@ typedef typename packet_traits<LhsScalar>::type _LhsPacket; typedef typename packet_traits<RhsScalar>::type _RhsPacket; typedef typename packet_traits<ResScalar>::type _ResPacket; -typedef typename meta_if<Vectorizable,_LhsPacket,LhsScalar>::ret LhsPacket; -typedef typename meta_if<Vectorizable,_RhsPacket,RhsScalar>::ret RhsPacket; -typedef typename meta_if<Vectorizable,_ResPacket,ResScalar>::ret ResPacket; +typedef typename conditional<Vectorizable,_LhsPacket,LhsScalar>::type LhsPacket; +typedef typename conditional<Vectorizable,_RhsPacket,RhsScalar>::type RhsPacket; +typedef typename conditional<Vectorizable,_ResPacket,ResScalar>::type ResPacket; EIGEN_DONT_INLINE static void run( Index rows, Index cols, diff --git a/Eigen/src/Core/products/SelfadjointRank2Update.h b/Eigen/src/Core/products/SelfadjointRank2Update.h index 13b088031..ece4c426b 100644 --- a/Eigen/src/Core/products/SelfadjointRank2Update.h +++ b/Eigen/src/Core/products/SelfadjointRank2Update.h @@ -63,7 +63,7 @@ struct selfadjoint_rank2_update_selector<Scalar,Index,UType,VType,Upper> }; template<bool Cond, typename T> struct conj_expr_if - : meta_if<!Cond, const T&, + : conditional<!Cond, const T&, CwiseUnaryOp<scalar_conjugate_op<typename traits<T>::Scalar>,T> > {}; } // end namespace internal @@ -88,8 +88,8 @@ SelfAdjointView<MatrixType,UpLo>& SelfAdjointView<MatrixType,UpLo> enum { IsRowMajor = (internal::traits<MatrixType>::Flags&RowMajorBit) ? 1 : 0 }; internal::selfadjoint_rank2_update_selector<Scalar, Index, - typename internal::cleantype<typename internal::conj_expr_if<IsRowMajor ^ UBlasTraits::NeedToConjugate,_ActualUType>::ret>::type, - typename internal::cleantype<typename internal::conj_expr_if<IsRowMajor ^ VBlasTraits::NeedToConjugate,_ActualVType>::ret>::type, + typename internal::cleantype<typename internal::conj_expr_if<IsRowMajor ^ UBlasTraits::NeedToConjugate,_ActualUType>::type>::type, + typename internal::cleantype<typename internal::conj_expr_if<IsRowMajor ^ VBlasTraits::NeedToConjugate,_ActualVType>::type>::type, (IsRowMajor ? int(UpLo==Upper ? Lower : Upper) : UpLo)> ::run(const_cast<Scalar*>(_expression().data()),_expression().outerStride(),actualU,actualV,actualAlpha); diff --git a/Eigen/src/Core/products/TriangularMatrixVector.h b/Eigen/src/Core/products/TriangularMatrixVector.h index 4c1cfc492..2b175fdf3 100644 --- a/Eigen/src/Core/products/TriangularMatrixVector.h +++ b/Eigen/src/Core/products/TriangularMatrixVector.h @@ -57,8 +57,8 @@ struct product_triangular_vector_selector<true,Lhs,Rhs,Result,Mode,ConjLhs,ConjR static EIGEN_DONT_INLINE void run(const Lhs& lhs, const Rhs& rhs, Result& res, typename traits<Lhs>::Scalar alpha) { static const Index PanelWidth = EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH; - typename conj_expr_if<ConjLhs,Lhs>::ret cjLhs(lhs); - typename conj_expr_if<ConjRhs,Rhs>::ret cjRhs(rhs); + typename conj_expr_if<ConjLhs,Lhs>::type cjLhs(lhs); + typename conj_expr_if<ConjRhs,Rhs>::type cjRhs(rhs); Index size = lhs.cols(); for (Index pi=0; pi<size; pi+=PanelWidth) @@ -100,8 +100,8 @@ struct product_triangular_vector_selector<true,Lhs,Rhs,Result,Mode,ConjLhs,ConjR static void run(const Lhs& lhs, const Rhs& rhs, Result& res, typename traits<Lhs>::Scalar alpha) { static const Index PanelWidth = EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH; - typename conj_expr_if<ConjLhs,Lhs>::ret cjLhs(lhs); - typename conj_expr_if<ConjRhs,Rhs>::ret cjRhs(rhs); + typename conj_expr_if<ConjLhs,Lhs>::type cjLhs(lhs); + typename conj_expr_if<ConjRhs,Rhs>::type cjRhs(rhs); Index size = lhs.cols(); for (Index pi=0; pi<size; pi+=PanelWidth) { diff --git a/Eigen/src/Core/util/BlasUtil.h b/Eigen/src/Core/util/BlasUtil.h index 7c976a5bc..d776c4507 100644 --- a/Eigen/src/Core/util/BlasUtil.h +++ b/Eigen/src/Core/util/BlasUtil.h @@ -173,10 +173,10 @@ template<typename XprType> struct blas_traits int(inner_stride_at_compile_time<XprType>::ret) == 1) ) ? 1 : 0 }; - typedef typename meta_if<bool(HasUsableDirectAccess), + typedef typename conditional<bool(HasUsableDirectAccess), ExtractType, typename _ExtractType::PlainObject - >::ret DirectLinearAccessType; + >::type DirectLinearAccessType; static inline ExtractType extract(const XprType& x) { return x; } static inline Scalar extractScalarFactor(const XprType&) { return Scalar(1); } }; @@ -234,10 +234,10 @@ struct blas_traits<Transpose<NestedXpr> > typedef Transpose<NestedXpr> XprType; typedef Transpose<typename Base::_ExtractType> ExtractType; typedef Transpose<typename Base::_ExtractType> _ExtractType; - typedef typename meta_if<bool(Base::HasUsableDirectAccess), + typedef typename conditional<bool(Base::HasUsableDirectAccess), ExtractType, typename ExtractType::PlainObject - >::ret DirectLinearAccessType; + >::type DirectLinearAccessType; enum { IsTransposed = Base::IsTransposed ? 0 : 1 }; diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h index 56330db9b..53dfa9949 100644 --- a/Eigen/src/Core/util/Meta.h +++ b/Eigen/src/Core/util/Meta.h @@ -35,29 +35,29 @@ namespace internal { * we however don't want to add a dependency to Boost. */ -struct meta_true { enum { ret = 1 }; }; -struct meta_false { enum { ret = 0 }; }; +struct true_type { enum { value = 1 }; }; +struct false_type { enum { value = 0 }; }; template<bool Condition, typename Then, typename Else> -struct meta_if { typedef Then ret; }; +struct conditional { typedef Then type; }; template<typename Then, typename Else> -struct meta_if <false, Then, Else> { typedef Else ret; }; +struct conditional <false, Then, Else> { typedef Else type; }; -template<typename T, typename U> struct is_same_type { enum { ret = 0 }; }; -template<typename T> struct is_same_type<T,T> { enum { ret = 1 }; }; +template<typename T, typename U> struct is_same { enum { value = 0 }; }; +template<typename T> struct is_same<T,T> { enum { value = 1 }; }; -template<typename T> struct unref { typedef T type; }; -template<typename T> struct unref<T&> { typedef T type; }; +template<typename T> struct remove_reference { typedef T type; }; +template<typename T> struct remove_reference<T&> { typedef T type; }; -template<typename T> struct unpointer { typedef T type; }; -template<typename T> struct unpointer<T*> { typedef T type; }; -template<typename T> struct unpointer<T*const> { typedef T type; }; +template<typename T> struct remove_pointer { typedef T type; }; +template<typename T> struct remove_pointer<T*> { typedef T type; }; +template<typename T> struct remove_pointer<T*const> { typedef T type; }; -template<typename T> struct unconst { typedef T type; }; -template<typename T> struct unconst<const T> { typedef T type; }; -template<typename T> struct unconst<T const &> { typedef T & type; }; -template<typename T> struct unconst<T const *> { typedef T * type; }; +template<typename T> struct remove_const { typedef T type; }; +template<typename T> struct remove_const<const T> { typedef T type; }; +template<typename T> struct remove_const<T const &> { typedef T & type; }; +template<typename T> struct remove_const<T const *> { typedef T * type; }; template<typename T> struct cleantype { typedef T type; }; template<typename T> struct cleantype<const T> { typedef typename cleantype<T>::type type; }; @@ -66,33 +66,33 @@ template<typename T> struct cleantype<T&> { typedef typename cleantype<T> template<typename T> struct cleantype<const T*> { typedef typename cleantype<T>::type type; }; template<typename T> struct cleantype<T*> { typedef typename cleantype<T>::type type; }; -template<typename T> struct is_arithmetic { enum { ret = false }; }; -template<> struct is_arithmetic<float> { enum { ret = true }; }; -template<> struct is_arithmetic<double> { enum { ret = true }; }; -template<> struct is_arithmetic<long double> { enum { ret = true }; }; -template<> struct is_arithmetic<bool> { enum { ret = true }; }; -template<> struct is_arithmetic<char> { enum { ret = true }; }; -template<> struct is_arithmetic<signed char> { enum { ret = true }; }; -template<> struct is_arithmetic<unsigned char> { enum { ret = true }; }; -template<> struct is_arithmetic<signed short> { enum { ret = true }; }; -template<> struct is_arithmetic<unsigned short>{ enum { ret = true }; }; -template<> struct is_arithmetic<signed int> { enum { ret = true }; }; -template<> struct is_arithmetic<unsigned int> { enum { ret = true }; }; -template<> struct is_arithmetic<signed long> { enum { ret = true }; }; -template<> struct is_arithmetic<unsigned long> { enum { ret = true }; }; -template<> struct is_arithmetic<signed long long> { enum { ret = true }; }; -template<> struct is_arithmetic<unsigned long long> { enum { ret = true }; }; - -template<typename T> struct makeconst { typedef const T type; }; -template<typename T> struct makeconst<const T> { typedef const T type; }; -template<typename T> struct makeconst<T&> { typedef const T& type; }; -template<typename T> struct makeconst<const T&> { typedef const T& type; }; -template<typename T> struct makeconst<T*> { typedef const T* type; }; -template<typename T> struct makeconst<const T*> { typedef const T* type; }; +template<typename T> struct is_arithmetic { enum { value = false }; }; +template<> struct is_arithmetic<float> { enum { value = true }; }; +template<> struct is_arithmetic<double> { enum { value = true }; }; +template<> struct is_arithmetic<long double> { enum { value = true }; }; +template<> struct is_arithmetic<bool> { enum { value = true }; }; +template<> struct is_arithmetic<char> { enum { value = true }; }; +template<> struct is_arithmetic<signed char> { enum { value = true }; }; +template<> struct is_arithmetic<unsigned char> { enum { value = true }; }; +template<> struct is_arithmetic<signed short> { enum { value = true }; }; +template<> struct is_arithmetic<unsigned short>{ enum { value = true }; }; +template<> struct is_arithmetic<signed int> { enum { value = true }; }; +template<> struct is_arithmetic<unsigned int> { enum { value = true }; }; +template<> struct is_arithmetic<signed long> { enum { value = true }; }; +template<> struct is_arithmetic<unsigned long> { enum { value = true }; }; +template<> struct is_arithmetic<signed long long> { enum { value = true }; }; +template<> struct is_arithmetic<unsigned long long> { enum { value = true }; }; + +template<typename T> struct add_const { typedef const T type; }; +template<typename T> struct add_const<const T> { typedef const T type; }; +template<typename T> struct add_const<T&> { typedef const T& type; }; +template<typename T> struct add_const<const T&> { typedef const T& type; }; +template<typename T> struct add_const<T*> { typedef const T* type; }; +template<typename T> struct add_const<const T*> { typedef const T* type; }; template<typename T> struct makeconst_return_type { - typedef typename meta_if<is_arithmetic<T>::ret, T, typename makeconst<T>::type>::ret type; + typedef typename conditional<is_arithmetic<T>::value, T, typename add_const<T>::type>::type type; }; /** \internal Allows to enable/disable an overload diff --git a/Eigen/src/Core/util/XprHelper.h b/Eigen/src/Core/util/XprHelper.h index 9f5bd7d71..89df78de0 100644 --- a/Eigen/src/Core/util/XprHelper.h +++ b/Eigen/src/Core/util/XprHelper.h @@ -52,7 +52,7 @@ class no_assignment_operator template<typename I1, typename I2> struct promote_index_type { - typedef typename meta_if<(sizeof(I1)<sizeof(I2)), I2, I1>::ret type; + typedef typename conditional<(sizeof(I1)<sizeof(I2)), I2, I1>::type type; }; /** \internal If the template parameter Value is Dynamic, this class is just a wrapper around a T variable that @@ -281,11 +281,11 @@ struct is_reference<T&> template <typename T> struct ref_selector { - typedef typename meta_if< + typedef typename conditional< bool(traits<T>::Flags & NestByRefBit), T const&, T - >::ret type; + >::type type; }; /** \internal Determines how a given expression should be nested into another one. @@ -319,12 +319,12 @@ template<typename T, int n=1, typename PlainObject = typename eval<T>::type> str CostNoEval = (N-1) * int(CoeffReadCost) }; - typedef typename meta_if< + typedef typename conditional< ( int(traits<T>::Flags) & EvalBeforeNestingBit ) || ( int(CostEval) <= int(CostNoEval) ), PlainObject, typename ref_selector<T>::type - >::ret type; + >::type type; /* this is what the above logic should be updated to look like: enum { @@ -334,14 +334,14 @@ template<typename T, int n=1, typename PlainObject = typename eval<T>::type> str CostNoEval = n == Dynamic || (CoeffReadCost == Dynamic && n>1) ? int(Dynamic) : (n-1) * int(CoeffReadCost) }; - typedef typename meta_if< + typedef typename conditional< ( int(traits<T>::Flags) & EvalBeforeNestingBit ) || ( int(CostNoEval) == Dynamic ? true : int(CostEval) == Dynamic ? false : int(CostEval) <= int(CostNoEval) ), PlainObject, typename ref_selector<T>::type - >::ret type; + >::type type; */ }; @@ -371,7 +371,7 @@ struct dense_xpr_base<Derived, ArrayXpr> /** \internal Helper base class to add a scalar multiple operator * overloads for complex types */ template<typename Derived,typename Scalar,typename OtherScalar, - bool EnableIt = !is_same_type<Scalar,OtherScalar>::ret > + bool EnableIt = !is_same<Scalar,OtherScalar>::value > struct special_scalar_op_base : public DenseCoeffsBase<Derived> { // dummy operator* so that the @@ -412,8 +412,8 @@ template<typename XprType, typename CastType> struct cast_return_type typedef typename XprType::Scalar CurrentScalarType; typedef typename cleantype<CastType>::type _CastType; typedef typename _CastType::Scalar NewScalarType; - typedef typename meta_if<is_same_type<CurrentScalarType,NewScalarType>::ret, - const XprType&,CastType>::ret type; + typedef typename conditional<is_same<CurrentScalarType,NewScalarType>::value, + const XprType&,CastType>::type type; }; template <typename A, typename B> struct promote_storage_type; @@ -434,11 +434,11 @@ struct plain_row_type typedef Array<Scalar, 1, ExpressionType::ColsAtCompileTime, ExpressionType::PlainObject::Options | RowMajor, 1, ExpressionType::MaxColsAtCompileTime> ArrayRowType; - typedef typename meta_if< - is_same_type< typename traits<ExpressionType>::XprKind, MatrixXpr >::ret, + typedef typename conditional< + is_same< typename traits<ExpressionType>::XprKind, MatrixXpr >::value, MatrixRowType, ArrayRowType - >::ret type; + >::type type; }; template<typename ExpressionType, typename Scalar = typename ExpressionType::Scalar> @@ -449,11 +449,11 @@ struct plain_col_type typedef Array<Scalar, ExpressionType::RowsAtCompileTime, 1, ExpressionType::PlainObject::Options & ~RowMajor, ExpressionType::MaxRowsAtCompileTime, 1> ArrayColType; - typedef typename meta_if< - is_same_type< typename traits<ExpressionType>::XprKind, MatrixXpr >::ret, + typedef typename conditional< + is_same< typename traits<ExpressionType>::XprKind, MatrixXpr >::value, MatrixColType, ArrayColType - >::ret type; + >::type type; }; template<typename ExpressionType, typename Scalar = typename ExpressionType::Scalar> @@ -465,11 +465,11 @@ struct plain_diag_type typedef Matrix<Scalar, diag_size, 1, ExpressionType::PlainObject::Options & ~RowMajor, max_diag_size, 1> MatrixDiagType; typedef Array<Scalar, diag_size, 1, ExpressionType::PlainObject::Options & ~RowMajor, max_diag_size, 1> ArrayDiagType; - typedef typename meta_if< - is_same_type< typename traits<ExpressionType>::XprKind, MatrixXpr >::ret, + typedef typename conditional< + is_same< typename traits<ExpressionType>::XprKind, MatrixXpr >::value, MatrixDiagType, ArrayDiagType - >::ret type; + >::type type; }; } // end namespace internal diff --git a/Eigen/src/Eigen2Support/Cwise.h b/Eigen/src/Eigen2Support/Cwise.h index 74fa63aaa..c80f56a69 100644 --- a/Eigen/src/Eigen2Support/Cwise.h +++ b/Eigen/src/Eigen2Support/Cwise.h @@ -62,8 +62,8 @@ template<typename ExpressionType> class Cwise public: typedef typename internal::traits<ExpressionType>::Scalar Scalar; - typedef typename internal::meta_if<internal::must_nest_by_value<ExpressionType>::ret, - ExpressionType, const ExpressionType&>::ret ExpressionTypeNested; + typedef typename internal::conditional<internal::must_nest_by_value<ExpressionType>::ret, + ExpressionType, const ExpressionType&>::type ExpressionTypeNested; typedef CwiseUnaryOp<internal::scalar_add_op<Scalar>, ExpressionType> ScalarAddReturnType; inline Cwise(const ExpressionType& matrix) : m_matrix(matrix) {} diff --git a/Eigen/src/Eigen2Support/Minor.h b/Eigen/src/Eigen2Support/Minor.h index a058ac1e0..3b3acd605 100644 --- a/Eigen/src/Eigen2Support/Minor.h +++ b/Eigen/src/Eigen2Support/Minor.h @@ -45,7 +45,7 @@ struct traits<Minor<MatrixType> > : traits<MatrixType> { typedef typename nested<MatrixType>::type MatrixTypeNested; - typedef typename unref<MatrixTypeNested>::type _MatrixTypeNested; + typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested; typedef typename MatrixType::StorageKind StorageKind; enum { RowsAtCompileTime = (MatrixType::RowsAtCompileTime != Dynamic) ? diff --git a/Eigen/src/Eigenvalues/Tridiagonalization.h b/Eigen/src/Eigenvalues/Tridiagonalization.h index fac79cf96..d70c4d433 100644 --- a/Eigen/src/Eigenvalues/Tridiagonalization.h +++ b/Eigen/src/Eigenvalues/Tridiagonalization.h @@ -86,17 +86,17 @@ template<typename _MatrixType> class Tridiagonalization typedef typename internal::plain_col_type<MatrixType, RealScalar>::type DiagonalType; typedef Matrix<RealScalar, SizeMinusOne, 1, Options & ~RowMajor, MaxSizeMinusOne, 1> SubDiagonalType; - typedef typename internal::meta_if<NumTraits<Scalar>::IsComplex, + typedef typename internal::conditional<NumTraits<Scalar>::IsComplex, typename Diagonal<MatrixType,0>::RealReturnType, Diagonal<MatrixType,0> - >::ret DiagonalReturnType; + >::type DiagonalReturnType; - typedef typename internal::meta_if<NumTraits<Scalar>::IsComplex, + typedef typename internal::conditional<NumTraits<Scalar>::IsComplex, typename Diagonal< Block<MatrixType,SizeMinusOne,SizeMinusOne>,0 >::RealReturnType, Diagonal< Block<MatrixType,SizeMinusOne,SizeMinusOne>,0 > - >::ret SubDiagonalReturnType; + >::type SubDiagonalReturnType; /** \brief Return type of matrixQ() */ typedef typename HouseholderSequence<MatrixType,CoeffVectorType>::ConjugateReturnType HouseholderSequenceType; diff --git a/Eigen/src/Geometry/Homogeneous.h b/Eigen/src/Geometry/Homogeneous.h index c6b387b5b..c9304e34c 100644 --- a/Eigen/src/Geometry/Homogeneous.h +++ b/Eigen/src/Geometry/Homogeneous.h @@ -48,7 +48,7 @@ struct traits<Homogeneous<MatrixType,Direction> > { typedef typename traits<MatrixType>::StorageKind StorageKind; typedef typename nested<MatrixType>::type MatrixTypeNested; - typedef typename unref<MatrixTypeNested>::type _MatrixTypeNested; + typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested; enum { RowsPlusOne = (MatrixType::RowsAtCompileTime != Dynamic) ? int(MatrixType::RowsAtCompileTime) + 1 : Dynamic, diff --git a/Eigen/src/Geometry/OrthoMethods.h b/Eigen/src/Geometry/OrthoMethods.h index f4695827d..31582d7ae 100644 --- a/Eigen/src/Geometry/OrthoMethods.h +++ b/Eigen/src/Geometry/OrthoMethods.h @@ -114,7 +114,7 @@ const typename VectorwiseOp<ExpressionType,Direction>::CrossReturnType VectorwiseOp<ExpressionType,Direction>::cross(const MatrixBase<OtherDerived>& other) const { EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(OtherDerived,3) - EIGEN_STATIC_ASSERT((internal::is_same_type<Scalar, typename OtherDerived::Scalar>::ret), + EIGEN_STATIC_ASSERT((internal::is_same<Scalar, typename OtherDerived::Scalar>::value), YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) CrossReturnType res(_expression().rows(),_expression().cols()); diff --git a/Eigen/src/Geometry/Quaternion.h b/Eigen/src/Geometry/Quaternion.h index ebc720b6c..afbeef26c 100644 --- a/Eigen/src/Geometry/Quaternion.h +++ b/Eigen/src/Geometry/Quaternion.h @@ -375,7 +375,7 @@ template <class OtherDerived> EIGEN_STRONG_INLINE Quaternion<typename internal::traits<Derived>::Scalar> QuaternionBase<Derived>::operator* (const QuaternionBase<OtherDerived>& other) const { - EIGEN_STATIC_ASSERT((internal::is_same_type<typename Derived::Scalar, typename OtherDerived::Scalar>::ret), + EIGEN_STATIC_ASSERT((internal::is_same<typename Derived::Scalar, typename OtherDerived::Scalar>::value), YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) return internal::quat_product<Architecture::Target, Derived, OtherDerived, typename internal::traits<Derived>::Scalar, @@ -448,7 +448,7 @@ template<class Derived> template<class MatrixDerived> inline Derived& QuaternionBase<Derived>::operator=(const MatrixBase<MatrixDerived>& xpr) { - EIGEN_STATIC_ASSERT((internal::is_same_type<typename Derived::Scalar, typename MatrixDerived::Scalar>::ret), + EIGEN_STATIC_ASSERT((internal::is_same<typename Derived::Scalar, typename MatrixDerived::Scalar>::value), YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) internal::quaternionbase_assign_impl<MatrixDerived>::run(*this, xpr.derived()); return derived(); diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h index b2ed121b6..896bbfd48 100644 --- a/Eigen/src/Geometry/Transform.h +++ b/Eigen/src/Geometry/Transform.h @@ -198,13 +198,13 @@ public: /** type of read/write reference to the linear part of the transformation */ typedef Block<MatrixType,Dim,Dim> LinearPart; /** type of read/write reference to the affine part of the transformation */ - typedef typename internal::meta_if<int(Mode)==int(AffineCompact), + typedef typename internal::conditional<int(Mode)==int(AffineCompact), MatrixType&, - Block<MatrixType,Dim,HDim> >::ret AffinePart; + Block<MatrixType,Dim,HDim> >::type AffinePart; /** type of read/write reference to the affine part of the transformation */ - typedef typename internal::meta_if<int(Mode)==int(AffineCompact), + typedef typename internal::conditional<int(Mode)==int(AffineCompact), MatrixType&, - Block<MatrixType,Dim,HDim> >::ret AffinePartNested; + Block<MatrixType,Dim,HDim> >::type AffinePartNested; /** type of a vector */ typedef Matrix<Scalar,Dim,1> VectorType; /** type of a read/write reference to the translation part of the rotation */ diff --git a/Eigen/src/Geometry/Umeyama.h b/Eigen/src/Geometry/Umeyama.h index c34eb1a98..b50f46173 100644 --- a/Eigen/src/Geometry/Umeyama.h +++ b/Eigen/src/Geometry/Umeyama.h @@ -113,7 +113,7 @@ umeyama(const MatrixBase<Derived>& src, const MatrixBase<OtherDerived>& dst, boo typedef typename Derived::Index Index; EIGEN_STATIC_ASSERT(!NumTraits<Scalar>::IsComplex, NUMERIC_TYPE_MUST_BE_REAL) - EIGEN_STATIC_ASSERT((internal::is_same_type<Scalar, typename internal::traits<OtherDerived>::Scalar>::ret), + EIGEN_STATIC_ASSERT((internal::is_same<Scalar, typename internal::traits<OtherDerived>::Scalar>::value), YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) enum { Dimension = EIGEN_SIZE_MIN_PREFER_DYNAMIC(Derived::RowsAtCompileTime, OtherDerived::RowsAtCompileTime) }; diff --git a/Eigen/src/Householder/HouseholderSequence.h b/Eigen/src/Householder/HouseholderSequence.h index b9be94093..ef4c0ca79 100644 --- a/Eigen/src/Householder/HouseholderSequence.h +++ b/Eigen/src/Householder/HouseholderSequence.h @@ -123,9 +123,9 @@ template<typename VectorsType, typename CoeffsType, int Side> class HouseholderS typedef HouseholderSequence< VectorsType, - typename internal::meta_if<NumTraits<Scalar>::IsComplex, + typename internal::conditional<NumTraits<Scalar>::IsComplex, typename internal::cleantype<typename CoeffsType::ConjugateReturnType>::type, - CoeffsType>::ret, + CoeffsType>::type, Side > ConjugateReturnType; @@ -167,7 +167,7 @@ template<typename VectorsType, typename CoeffsType, int Side> class HouseholderS // FIXME find a way to pass this temporary if the user want to Matrix<Scalar, DestType::RowsAtCompileTime, 1, AutoAlign|ColMajor, DestType::MaxRowsAtCompileTime, 1> temp(rows()); - if( internal::is_same_type<typename internal::cleantype<VectorsType>::type,DestType>::ret + if( internal::is_same<typename internal::cleantype<VectorsType>::type,DestType>::value && internal::extract_data(dst) == internal::extract_data(m_vectors)) { // in-place diff --git a/Eigen/src/Jacobi/Jacobi.h b/Eigen/src/Jacobi/Jacobi.h index 58f6c98fb..fb5a2c717 100644 --- a/Eigen/src/Jacobi/Jacobi.h +++ b/Eigen/src/Jacobi/Jacobi.h @@ -80,8 +80,8 @@ template<typename Scalar> class JacobiRotation void makeGivens(const Scalar& p, const Scalar& q, Scalar* z=0); protected: - void makeGivens(const Scalar& p, const Scalar& q, Scalar* z, internal::meta_true); - void makeGivens(const Scalar& p, const Scalar& q, Scalar* z, internal::meta_false); + void makeGivens(const Scalar& p, const Scalar& q, Scalar* z, internal::true_type); + void makeGivens(const Scalar& p, const Scalar& q, Scalar* z, internal::false_type); Scalar m_c, m_s; }; @@ -157,13 +157,13 @@ inline bool JacobiRotation<Scalar>::makeJacobi(const MatrixBase<Derived>& m, typ template<typename Scalar> void JacobiRotation<Scalar>::makeGivens(const Scalar& p, const Scalar& q, Scalar* z) { - makeGivens(p, q, z, typename internal::meta_if<NumTraits<Scalar>::IsComplex, internal::meta_true, internal::meta_false>::ret()); + makeGivens(p, q, z, typename internal::conditional<NumTraits<Scalar>::IsComplex, internal::true_type, internal::false_type>::type()); } // specialization for complexes template<typename Scalar> -void JacobiRotation<Scalar>::makeGivens(const Scalar& p, const Scalar& q, Scalar* r, internal::meta_true) +void JacobiRotation<Scalar>::makeGivens(const Scalar& p, const Scalar& q, Scalar* r, internal::true_type) { if(q==Scalar(0)) { @@ -218,7 +218,7 @@ void JacobiRotation<Scalar>::makeGivens(const Scalar& p, const Scalar& q, Scalar // specialization for reals template<typename Scalar> -void JacobiRotation<Scalar>::makeGivens(const Scalar& p, const Scalar& q, Scalar* r, internal::meta_false) +void JacobiRotation<Scalar>::makeGivens(const Scalar& p, const Scalar& q, Scalar* r, internal::false_type) { if(q==0) diff --git a/Eigen/src/LU/Inverse.h b/Eigen/src/LU/Inverse.h index 99286523a..50061788b 100644 --- a/Eigen/src/LU/Inverse.h +++ b/Eigen/src/LU/Inverse.h @@ -364,11 +364,11 @@ inline void MatrixBase<Derived>::computeInverseAndDetWithCheck( eigen_assert(rows() == cols()); // for 2x2, it's worth giving a chance to avoid evaluating. // for larger sizes, evaluating has negligible cost and limits code size. - typedef typename internal::meta_if< + typedef typename internal::conditional< RowsAtCompileTime == 2, typename internal::cleantype<typename internal::nested<Derived, 2>::type>::type, PlainObject - >::ret MatrixType; + >::type MatrixType; internal::compute_inverse_and_det_with_check<MatrixType, ResultType>::run (derived(), absDeterminantThreshold, inverse, determinant, invertible); } diff --git a/Eigen/src/Sparse/SparseCwiseUnaryOp.h b/Eigen/src/Sparse/SparseCwiseUnaryOp.h index 709661954..aa068835f 100644 --- a/Eigen/src/Sparse/SparseCwiseUnaryOp.h +++ b/Eigen/src/Sparse/SparseCwiseUnaryOp.h @@ -32,7 +32,7 @@ // UnaryOp(typename MatrixType::Scalar) // >::type Scalar; // typedef typename MatrixType::Nested MatrixTypeNested; -// typedef typename internal::unref<MatrixTypeNested>::type _MatrixTypeNested; +// typedef typename internal::remove_reference<MatrixTypeNested>::type _MatrixTypeNested; // enum { // CoeffReadCost = _MatrixTypeNested::CoeffReadCost + internal::functor_traits<UnaryOp>::Cost // }; @@ -45,7 +45,7 @@ class CwiseUnaryOpImpl<UnaryOp,MatrixType,Sparse> public: class InnerIterator; -// typedef typename internal::unref<LhsNested>::type _LhsNested; +// typedef typename internal::remove_reference<LhsNested>::type _LhsNested; typedef CwiseUnaryOp<UnaryOp, MatrixType> Derived; EIGEN_SPARSE_PUBLIC_INTERFACE(Derived) @@ -87,7 +87,7 @@ class CwiseUnaryViewImpl<ViewOp,MatrixType,Sparse> public: class InnerIterator; -// typedef typename internal::unref<LhsNested>::type _LhsNested; +// typedef typename internal::remove_reference<LhsNested>::type _LhsNested; typedef CwiseUnaryView<ViewOp, MatrixType> Derived; EIGEN_SPARSE_PUBLIC_INTERFACE(Derived) diff --git a/Eigen/src/Sparse/SparseDot.h b/Eigen/src/Sparse/SparseDot.h index 13605ca88..1f10f71a4 100644 --- a/Eigen/src/Sparse/SparseDot.h +++ b/Eigen/src/Sparse/SparseDot.h @@ -33,7 +33,7 @@ SparseMatrixBase<Derived>::dot(const MatrixBase<OtherDerived>& other) const EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived) - EIGEN_STATIC_ASSERT((internal::is_same_type<Scalar, typename OtherDerived::Scalar>::ret), + EIGEN_STATIC_ASSERT((internal::is_same<Scalar, typename OtherDerived::Scalar>::value), YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) eigen_assert(size() == other.size()); @@ -57,7 +57,7 @@ SparseMatrixBase<Derived>::dot(const SparseMatrixBase<OtherDerived>& other) cons EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived) - EIGEN_STATIC_ASSERT((internal::is_same_type<Scalar, typename OtherDerived::Scalar>::ret), + EIGEN_STATIC_ASSERT((internal::is_same<Scalar, typename OtherDerived::Scalar>::value), YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) eigen_assert(size() == other.size()); diff --git a/Eigen/src/Sparse/SparseMatrixBase.h b/Eigen/src/Sparse/SparseMatrixBase.h index eb88c8a77..8750de12c 100644 --- a/Eigen/src/Sparse/SparseMatrixBase.h +++ b/Eigen/src/Sparse/SparseMatrixBase.h @@ -98,19 +98,19 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived> }; /* \internal the return type of MatrixBase::conjugate() */ -// typedef typename internal::meta_if<NumTraits<Scalar>::IsComplex, +// typedef typename internal::conditional<NumTraits<Scalar>::IsComplex, // const SparseCwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, Derived>, // const Derived& -// >::ret ConjugateReturnType; +// >::type ConjugateReturnType; /* \internal the return type of MatrixBase::real() */ // typedef SparseCwiseUnaryOp<internal::scalar_real_op<Scalar>, Derived> RealReturnType; /* \internal the return type of MatrixBase::imag() */ // typedef SparseCwiseUnaryOp<internal::scalar_imag_op<Scalar>, Derived> ImagReturnType; /** \internal the return type of MatrixBase::adjoint() */ - typedef typename internal::meta_if<NumTraits<Scalar>::IsComplex, + typedef typename internal::conditional<NumTraits<Scalar>::IsComplex, CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, Eigen::Transpose<Derived> >, Transpose<Derived> - >::ret AdjointReturnType; + >::type AdjointReturnType; typedef SparseMatrix<Scalar, Flags&RowMajorBit ? RowMajor : ColMajor> PlainObject; @@ -132,7 +132,7 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived> /** \internal the return type of coeff() */ - typedef typename internal::meta_if<_HasDirectAccess, const Scalar&, Scalar>::ret CoeffReturnType; + typedef typename internal::conditional<_HasDirectAccess, const Scalar&, Scalar>::type CoeffReturnType; /** \internal Represents a matrix with all coefficients equal to one another*/ typedef CwiseNullaryOp<internal::scalar_constant_op<Scalar>,Matrix<Scalar,Dynamic,Dynamic> > ConstantReturnType; @@ -197,7 +197,7 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived> enum { Flip = (Flags & RowMajorBit) != (OtherDerived::Flags & RowMajorBit) }; const Index outerSize = other.outerSize(); - //typedef typename internal::meta_if<transpose, LinkedVectorMatrix<Scalar,Flags&RowMajorBit>, Derived>::ret TempType; + //typedef typename internal::conditional<transpose, LinkedVectorMatrix<Scalar,Flags&RowMajorBit>, Derived>::type TempType; // thanks to shallow copies, we always eval to a tempary Derived temp(other.rows(), other.cols()); @@ -638,7 +638,7 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived> // { // EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) // EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) -// EIGEN_STATIC_ASSERT((internal::is_same_type<Scalar, typename OtherDerived::Scalar>::ret), +// EIGEN_STATIC_ASSERT((internal::is_same<Scalar, typename OtherDerived::Scalar>::value), // YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) // // eigen_assert(derived().size() == other.size()); diff --git a/Eigen/src/Sparse/SparseProduct.h b/Eigen/src/Sparse/SparseProduct.h index aa8bda23d..e994dbb99 100644 --- a/Eigen/src/Sparse/SparseProduct.h +++ b/Eigen/src/Sparse/SparseProduct.h @@ -36,13 +36,13 @@ struct SparseSparseProductReturnType TransposeLhs = LhsRowMajor && (!RhsRowMajor) }; - typedef typename internal::meta_if<TransposeLhs, + typedef typename internal::conditional<TransposeLhs, SparseMatrix<Scalar,0>, - const typename internal::nested<Lhs,Rhs::RowsAtCompileTime>::type>::ret LhsNested; + const typename internal::nested<Lhs,Rhs::RowsAtCompileTime>::type>::type LhsNested; - typedef typename internal::meta_if<TransposeRhs, + typedef typename internal::conditional<TransposeRhs, SparseMatrix<Scalar,0>, - const typename internal::nested<Rhs,Lhs::RowsAtCompileTime>::type>::ret RhsNested; + const typename internal::nested<Rhs,Lhs::RowsAtCompileTime>::type>::type RhsNested; typedef SparseSparseProduct<LhsNested, RhsNested> Type; }; diff --git a/Eigen/src/Sparse/SparseTriangularView.h b/Eigen/src/Sparse/SparseTriangularView.h index 2d5c9cf75..8d0256599 100644 --- a/Eigen/src/Sparse/SparseTriangularView.h +++ b/Eigen/src/Sparse/SparseTriangularView.h @@ -46,8 +46,8 @@ template<typename MatrixType, int Mode> class SparseTriangularView inline Index rows() { return m_matrix.rows(); } inline Index cols() { return m_matrix.cols(); } - typedef typename internal::meta_if<internal::must_nest_by_value<MatrixType>::ret, - MatrixType, const MatrixType&>::ret MatrixTypeNested; + typedef typename internal::conditional<internal::must_nest_by_value<MatrixType>::ret, + MatrixType, const MatrixType&>::type MatrixTypeNested; inline SparseTriangularView(const MatrixType& matrix) : m_matrix(matrix) {} diff --git a/Eigen/src/Sparse/TriangularSolver.h b/Eigen/src/Sparse/TriangularSolver.h index 06721ce86..73468e044 100644 --- a/Eigen/src/Sparse/TriangularSolver.h +++ b/Eigen/src/Sparse/TriangularSolver.h @@ -175,11 +175,11 @@ void SparseTriangularView<ExpressionType,Mode>::solveInPlace(MatrixBase<OtherDer enum { copy = internal::traits<OtherDerived>::Flags & RowMajorBit }; - typedef typename internal::meta_if<copy, - typename internal::plain_matrix_type_column_major<OtherDerived>::type, OtherDerived&>::ret OtherCopy; + typedef typename internal::conditional<copy, + typename internal::plain_matrix_type_column_major<OtherDerived>::type, OtherDerived&>::type OtherCopy; OtherCopy otherCopy(other.derived()); - internal::sparse_solve_triangular_selector<ExpressionType, typename internal::unref<OtherCopy>::type, Mode>::run(m_matrix, otherCopy); + internal::sparse_solve_triangular_selector<ExpressionType, typename internal::remove_reference<OtherCopy>::type, Mode>::run(m_matrix, otherCopy); if (copy) other = otherCopy; @@ -302,8 +302,8 @@ void SparseTriangularView<ExpressionType,Mode>::solveInPlace(SparseMatrixBase<Ot // enum { copy = internal::traits<OtherDerived>::Flags & RowMajorBit }; -// typedef typename internal::meta_if<copy, -// typename internal::plain_matrix_type_column_major<OtherDerived>::type, OtherDerived&>::ret OtherCopy; +// typedef typename internal::conditional<copy, +// typename internal::plain_matrix_type_column_major<OtherDerived>::type, OtherDerived&>::type OtherCopy; // OtherCopy otherCopy(other.derived()); internal::sparse_solve_triangular_sparse_selector<ExpressionType, OtherDerived, Mode>::run(m_matrix, other.derived()); diff --git a/Eigen/src/plugins/CommonCwiseUnaryOps.h b/Eigen/src/plugins/CommonCwiseUnaryOps.h index 775e77c81..f2da51efa 100644 --- a/Eigen/src/plugins/CommonCwiseUnaryOps.h +++ b/Eigen/src/plugins/CommonCwiseUnaryOps.h @@ -32,20 +32,20 @@ typedef CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, Derived> ScalarMultip /** \internal Represents a quotient of an expression by a scalar*/ typedef CwiseUnaryOp<internal::scalar_quotient1_op<Scalar>, Derived> ScalarQuotient1ReturnType; /** \internal the return type of conjugate() */ -typedef typename internal::meta_if<NumTraits<Scalar>::IsComplex, +typedef typename internal::conditional<NumTraits<Scalar>::IsComplex, const CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, Derived>, const Derived& - >::ret ConjugateReturnType; + >::type ConjugateReturnType; /** \internal the return type of real() const */ -typedef typename internal::meta_if<NumTraits<Scalar>::IsComplex, +typedef typename internal::conditional<NumTraits<Scalar>::IsComplex, const CwiseUnaryOp<internal::scalar_real_op<Scalar>, Derived>, const Derived& - >::ret RealReturnType; + >::type RealReturnType; /** \internal the return type of real() */ -typedef typename internal::meta_if<NumTraits<Scalar>::IsComplex, +typedef typename internal::conditional<NumTraits<Scalar>::IsComplex, CwiseUnaryView<internal::scalar_real_ref_op<Scalar>, Derived>, Derived& - >::ret NonConstRealReturnType; + >::type NonConstRealReturnType; /** \internal the return type of imag() const */ typedef CwiseUnaryOp<internal::scalar_imag_op<Scalar>, Derived> ImagReturnType; /** \internal the return type of imag() */ diff --git a/test/adjoint.cpp b/test/adjoint.cpp index f37bad787..72cbf3406 100644 --- a/test/adjoint.cpp +++ b/test/adjoint.cpp @@ -41,7 +41,7 @@ template<typename MatrixType> void adjoint(const MatrixType& m) Index cols = m.cols(); RealScalar largerEps = test_precision<RealScalar>(); - if (internal::is_same_type<RealScalar,float>::ret) + if (internal::is_same<RealScalar,float>::value) largerEps = RealScalar(1e-3f); MatrixType m1 = MatrixType::Random(rows, cols), diff --git a/test/array.cpp b/test/array.cpp index 70473bd1d..72d3584e6 100644 --- a/test/array.cpp +++ b/test/array.cpp @@ -206,11 +206,11 @@ void test_array() CALL_SUBTEST_5( array_real(ArrayXXf(8, 12)) ); } - VERIFY((internal::is_same_type< internal::global_math_functions_filtering_base<int>::type, int >::ret)); - VERIFY((internal::is_same_type< internal::global_math_functions_filtering_base<float>::type, float >::ret)); - VERIFY((internal::is_same_type< internal::global_math_functions_filtering_base<Array2i>::type, ArrayBase<Array2i> >::ret)); + VERIFY((internal::is_same< internal::global_math_functions_filtering_base<int>::type, int >::value)); + VERIFY((internal::is_same< internal::global_math_functions_filtering_base<float>::type, float >::value)); + VERIFY((internal::is_same< internal::global_math_functions_filtering_base<Array2i>::type, ArrayBase<Array2i> >::value)); typedef CwiseUnaryOp<internal::scalar_sum_op<double>, ArrayXd > Xpr; - VERIFY((internal::is_same_type< internal::global_math_functions_filtering_base<Xpr>::type, + VERIFY((internal::is_same< internal::global_math_functions_filtering_base<Xpr>::type, ArrayBase<Xpr> - >::ret)); + >::value)); } diff --git a/test/cholesky.cpp b/test/cholesky.cpp index 0a0424aa1..1a6d4bed6 100644 --- a/test/cholesky.cpp +++ b/test/cholesky.cpp @@ -78,7 +78,7 @@ template<typename MatrixType> void cholesky(const MatrixType& m) //symm.template part<StrictlyLower>().setZero(); #ifdef HAS_GSL -// if (internal::is_same_type<RealScalar,double>::ret) +// if (internal::is_same<RealScalar,double>::value) // { // typedef GslTraits<Scalar> Gsl; // typename Gsl::Matrix gMatA=0, gSymm=0; diff --git a/test/eigensolver_selfadjoint.cpp b/test/eigensolver_selfadjoint.cpp index 9a40ed529..dadf4bfca 100644 --- a/test/eigensolver_selfadjoint.cpp +++ b/test/eigensolver_selfadjoint.cpp @@ -63,7 +63,7 @@ template<typename MatrixType> void selfadjointeigensolver(const MatrixType& m) GeneralizedSelfAdjointEigenSolver<MatrixType> eiSymmGen(symmA, symmB); #ifdef HAS_GSL - if (internal::is_same_type<RealScalar,double>::ret) + if (internal::is_same<RealScalar,double>::value) { // restore symmA and symmB. symmA = MatrixType(symmA.template selfadjointView<Lower>()); diff --git a/test/geo_homogeneous.cpp b/test/geo_homogeneous.cpp index 7e93d843e..124071f47 100644 --- a/test/geo_homogeneous.cpp +++ b/test/geo_homogeneous.cpp @@ -42,7 +42,7 @@ template<typename Scalar,int Size> void homogeneous(void) typedef Matrix<Scalar,Size+1,Size> T3MatrixType; Scalar largeEps = test_precision<Scalar>(); - if (internal::is_same_type<Scalar,float>::ret) + if (internal::is_same<Scalar,float>::value) largeEps = 1e-3f; VectorType v0 = VectorType::Random(), diff --git a/test/geo_quaternion.cpp b/test/geo_quaternion.cpp index 6ad9a099d..aab7ed3f7 100644 --- a/test/geo_quaternion.cpp +++ b/test/geo_quaternion.cpp @@ -40,7 +40,7 @@ template<typename Scalar> void quaternion(void) typedef AngleAxis<Scalar> AngleAxisx; Scalar largeEps = test_precision<Scalar>(); - if (internal::is_same_type<Scalar,float>::ret) + if (internal::is_same<Scalar,float>::value) largeEps = 1e-3f; Scalar eps = internal::random<Scalar>() * Scalar(1e-2); @@ -96,7 +96,7 @@ template<typename Scalar> void quaternion(void) VERIFY_IS_APPROX( v2.normalized(),(q2.setFromTwoVectors(v1, v2)*v1).normalized()); VERIFY_IS_APPROX( v1.normalized(),(q2.setFromTwoVectors(v1, v1)*v1).normalized()); VERIFY_IS_APPROX(-v1.normalized(),(q2.setFromTwoVectors(v1,-v1)*v1).normalized()); - if (internal::is_same_type<Scalar,double>::ret) + if (internal::is_same<Scalar,double>::value) { v3 = (v1.array()+eps).matrix(); VERIFY_IS_APPROX( v3.normalized(),(q2.setFromTwoVectors(v1, v3)*v1).normalized()); diff --git a/test/geo_transformations.cpp b/test/geo_transformations.cpp index bc850e8dc..ac0c7ecbf 100644 --- a/test/geo_transformations.cpp +++ b/test/geo_transformations.cpp @@ -51,7 +51,7 @@ template<typename Scalar, int Mode> void non_projective_only(void) typedef Translation<Scalar,3> Translation3; Scalar largeEps = test_precision<Scalar>(); - if (internal::is_same_type<Scalar,float>::ret) + if (internal::is_same<Scalar,float>::value) largeEps = 1e-2f; Vector3 v0 = Vector3::Random(), @@ -126,7 +126,7 @@ template<typename Scalar, int Mode> void transformations(void) typedef Translation<Scalar,3> Translation3; Scalar largeEps = test_precision<Scalar>(); - if (internal::is_same_type<Scalar,float>::ret) + if (internal::is_same<Scalar,float>::value) largeEps = 1e-2f; Vector3 v0 = Vector3::Random(), diff --git a/test/meta.cpp b/test/meta.cpp index ba2167677..fb7d4548c 100644 --- a/test/meta.cpp +++ b/test/meta.cpp @@ -29,30 +29,30 @@ void test_meta() typedef float & FloatRef; typedef const float & ConstFloatRef; - VERIFY((internal::meta_if<(3<4),internal::meta_true, internal::meta_false>::ret::ret)); - VERIFY(( internal::is_same_type<float,float>::ret)); - VERIFY((!internal::is_same_type<float,double>::ret)); - VERIFY((!internal::is_same_type<float,float&>::ret)); - VERIFY((!internal::is_same_type<float,const float&>::ret)); + VERIFY((internal::conditional<(3<4),internal::true_type, internal::false_type>::type::value)); + VERIFY(( internal::is_same<float,float>::value)); + VERIFY((!internal::is_same<float,double>::value)); + VERIFY((!internal::is_same<float,float&>::value)); + VERIFY((!internal::is_same<float,const float&>::value)); - VERIFY(( internal::is_same_type<float,internal::cleantype<const float&>::type >::ret)); - VERIFY(( internal::is_same_type<float,internal::cleantype<const float*>::type >::ret)); - VERIFY(( internal::is_same_type<float,internal::cleantype<const float*&>::type >::ret)); - VERIFY(( internal::is_same_type<float,internal::cleantype<float**>::type >::ret)); - VERIFY(( internal::is_same_type<float,internal::cleantype<float**&>::type >::ret)); - VERIFY(( internal::is_same_type<float,internal::cleantype<float* const *&>::type >::ret)); - VERIFY(( internal::is_same_type<float,internal::cleantype<float* const>::type >::ret)); + VERIFY(( internal::is_same<float,internal::cleantype<const float&>::type >::value)); + VERIFY(( internal::is_same<float,internal::cleantype<const float*>::type >::value)); + VERIFY(( internal::is_same<float,internal::cleantype<const float*&>::type >::value)); + VERIFY(( internal::is_same<float,internal::cleantype<float**>::type >::value)); + VERIFY(( internal::is_same<float,internal::cleantype<float**&>::type >::value)); + VERIFY(( internal::is_same<float,internal::cleantype<float* const *&>::type >::value)); + VERIFY(( internal::is_same<float,internal::cleantype<float* const>::type >::value)); - VERIFY(( internal::is_same_type<float*,internal::unconst<const float*>::type >::ret)); - VERIFY(( internal::is_same_type<float&,internal::unconst<const float&>::type >::ret)); - VERIFY(( internal::is_same_type<float&,internal::unconst<ConstFloatRef>::type >::ret)); + VERIFY(( internal::is_same<float*,internal::remove_const<const float*>::type >::value)); + VERIFY(( internal::is_same<float&,internal::remove_const<const float&>::type >::value)); + VERIFY(( internal::is_same<float&,internal::remove_const<ConstFloatRef>::type >::value)); - VERIFY(( internal::is_same_type<float&,internal::unconst<float&>::type >::ret)); - VERIFY(( internal::is_same_type<float,internal::unref<float&>::type >::ret)); - VERIFY(( internal::is_same_type<const float,internal::unref<const float&>::type >::ret)); - VERIFY(( internal::is_same_type<float,internal::unpointer<float*>::type >::ret)); - VERIFY(( internal::is_same_type<const float,internal::unpointer<const float*>::type >::ret)); - VERIFY(( internal::is_same_type<float,internal::unpointer<float* const >::type >::ret)); + VERIFY(( internal::is_same<float&,internal::remove_const<float&>::type >::value)); + VERIFY(( internal::is_same<float,internal::remove_reference<float&>::type >::value)); + VERIFY(( internal::is_same<const float,internal::remove_reference<const float&>::type >::value)); + VERIFY(( internal::is_same<float,internal::remove_pointer<float*>::type >::value)); + VERIFY(( internal::is_same<const float,internal::remove_pointer<const float*>::type >::value)); + VERIFY(( internal::is_same<float,internal::remove_pointer<float* const >::type >::value)); VERIFY(internal::meta_sqrt<1>::ret == 1); #define VERIFY_META_SQRT(X) VERIFY(internal::meta_sqrt<X>::ret == int(internal::sqrt(double(X)))) diff --git a/test/packetmath.cpp b/test/packetmath.cpp index 3d1fc2850..001dbc4d2 100644 --- a/test/packetmath.cpp +++ b/test/packetmath.cpp @@ -167,7 +167,7 @@ template<typename Scalar> void packetmath() CHECK_CWISE2(REF_SUB, internal::psub); CHECK_CWISE2(REF_MUL, internal::pmul); #ifndef EIGEN_VECTORIZE_ALTIVEC - if (!internal::is_same_type<Scalar,int>::ret) + if (!internal::is_same<Scalar,int>::value) CHECK_CWISE2(REF_DIV, internal::pdiv); #endif CHECK_CWISE1(internal::negate, internal::pnegate); diff --git a/test/qr.cpp b/test/qr.cpp index 85707a06d..7e9ac9df9 100644 --- a/test/qr.cpp +++ b/test/qr.cpp @@ -76,7 +76,7 @@ template<typename MatrixType> void qr_invertible() MatrixType m1(size, size), m2(size, size), m3(size, size); m1 = MatrixType::Random(size,size); - if (internal::is_same_type<RealScalar,float>::ret) + if (internal::is_same<RealScalar,float>::value) { // let's build a matrix more stable to inverse MatrixType a = MatrixType::Random(size,size*2); diff --git a/test/qr_colpivoting.cpp b/test/qr_colpivoting.cpp index 13495594b..ddfb1bad5 100644 --- a/test/qr_colpivoting.cpp +++ b/test/qr_colpivoting.cpp @@ -95,7 +95,7 @@ template<typename MatrixType> void qr_invertible() MatrixType m1(size, size), m2(size, size), m3(size, size); m1 = MatrixType::Random(size,size); - if (internal::is_same_type<RealScalar,float>::ret) + if (internal::is_same<RealScalar,float>::value) { // let's build a matrix more stable to inverse MatrixType a = MatrixType::Random(size,size*2); diff --git a/test/qr_fullpivoting.cpp b/test/qr_fullpivoting.cpp index f77ac86a9..175c293b3 100644 --- a/test/qr_fullpivoting.cpp +++ b/test/qr_fullpivoting.cpp @@ -74,7 +74,7 @@ template<typename MatrixType> void qr_invertible() MatrixType m1(size, size), m2(size, size), m3(size, size); m1 = MatrixType::Random(size,size); - if (internal::is_same_type<RealScalar,float>::ret) + if (internal::is_same<RealScalar,float>::value) { // let's build a matrix more stable to inverse MatrixType a = MatrixType::Random(size,size*2); diff --git a/test/sparse_basic.cpp b/test/sparse_basic.cpp index 8dfa0baff..ad294fc98 100644 --- a/test/sparse_basic.cpp +++ b/test/sparse_basic.cpp @@ -54,7 +54,7 @@ template<typename SparseMatrixType> void sparse_basic(const SparseMatrixType& re for (int i=0; i<(int)zeroCoords.size(); ++i) { VERIFY_IS_MUCH_SMALLER_THAN( m.coeff(zeroCoords[i].x(),zeroCoords[i].y()), eps ); - if(internal::is_same_type<SparseMatrixType,SparseMatrix<Scalar,Flags> >::ret) + if(internal::is_same<SparseMatrixType,SparseMatrix<Scalar,Flags> >::value) VERIFY_RAISES_ASSERT( m.coeffRef(zeroCoords[0].x(),zeroCoords[0].y()) = 5 ); } VERIFY_IS_APPROX(m, refMat); diff --git a/test/swap.cpp b/test/swap.cpp index 4a575e7d7..b18562f28 100644 --- a/test/swap.cpp +++ b/test/swap.cpp @@ -42,7 +42,7 @@ template<typename MatrixType> void swap(const MatrixType& m) typedef typename other_matrix_type<MatrixType>::type OtherMatrixType; typedef typename MatrixType::Scalar Scalar; - eigen_assert((!internal::is_same_type<MatrixType,OtherMatrixType>::ret)); + eigen_assert((!internal::is_same<MatrixType,OtherMatrixType>::value)); typename MatrixType::Index rows = m.rows(); typename MatrixType::Index cols = m.cols(); diff --git a/unsupported/Eigen/FFT b/unsupported/Eigen/FFT index 592898078..0b2823058 100644 --- a/unsupported/Eigen/FFT +++ b/unsupported/Eigen/FFT @@ -240,7 +240,7 @@ class FFT EIGEN_STATIC_ASSERT_VECTOR_ONLY(InputDerived) EIGEN_STATIC_ASSERT_VECTOR_ONLY(ComplexDerived) EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(ComplexDerived,InputDerived) // size at compile-time - EIGEN_STATIC_ASSERT((internal::is_same_type<dst_type, Complex>::ret), + EIGEN_STATIC_ASSERT((internal::is_same<dst_type, Complex>::value), YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) EIGEN_STATIC_ASSERT(int(InputDerived::Flags)&int(ComplexDerived::Flags)&DirectAccessBit, THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_WITH_DIRECT_MEMORY_ACCESS_SUCH_AS_MAP_OR_PLAIN_MATRICES) @@ -309,7 +309,7 @@ class FFT EIGEN_STATIC_ASSERT_VECTOR_ONLY(OutputDerived) EIGEN_STATIC_ASSERT_VECTOR_ONLY(ComplexDerived) EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(ComplexDerived,OutputDerived) // size at compile-time - EIGEN_STATIC_ASSERT((internal::is_same_type<src_type, Complex>::ret), + EIGEN_STATIC_ASSERT((internal::is_same<src_type, Complex>::value), YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) EIGEN_STATIC_ASSERT(int(OutputDerived::Flags)&int(ComplexDerived::Flags)&DirectAccessBit, THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_WITH_DIRECT_MEMORY_ACCESS_SUCH_AS_MAP_OR_PLAIN_MATRICES) diff --git a/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h b/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h index 1809d4e93..a2aa42ad0 100644 --- a/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h +++ b/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h @@ -74,13 +74,13 @@ template<typename _DerType, bool Enable> struct auto_diff_special_op; template<typename _DerType> class AutoDiffScalar : public internal::auto_diff_special_op - <_DerType, !internal::is_same_type<typename internal::traits<typename internal::cleantype<_DerType>::type>::Scalar, - typename NumTraits<typename internal::traits<typename internal::cleantype<_DerType>::type>::Scalar>::Real>::ret> + <_DerType, !internal::is_same<typename internal::traits<typename internal::cleantype<_DerType>::type>::Scalar, + typename NumTraits<typename internal::traits<typename internal::cleantype<_DerType>::type>::Scalar>::Real>::value> { public: typedef internal::auto_diff_special_op - <_DerType, !internal::is_same_type<typename internal::traits<typename internal::cleantype<_DerType>::type>::Scalar, - typename NumTraits<typename internal::traits<typename internal::cleantype<_DerType>::type>::Scalar>::Real>::ret> Base; + <_DerType, !internal::is_same<typename internal::traits<typename internal::cleantype<_DerType>::type>::Scalar, + typename NumTraits<typename internal::traits<typename internal::cleantype<_DerType>::type>::Scalar>::Real>::value> Base; typedef typename internal::cleantype<_DerType>::type DerType; typedef typename internal::traits<DerType>::Scalar Scalar; typedef typename NumTraits<Scalar>::Real Real; @@ -341,14 +341,14 @@ namespace internal { template<typename _DerType> struct auto_diff_special_op<_DerType, true> // : auto_diff_scalar_op<_DerType, typename NumTraits<Scalar>::Real, -// is_same_type<Scalar,typename NumTraits<Scalar>::Real>::ret> +// is_same<Scalar,typename NumTraits<Scalar>::Real>::value> { typedef typename cleantype<_DerType>::type DerType; typedef typename traits<DerType>::Scalar Scalar; typedef typename NumTraits<Scalar>::Real Real; // typedef auto_diff_scalar_op<_DerType, typename NumTraits<Scalar>::Real, -// is_same_type<Scalar,typename NumTraits<Scalar>::Real>::ret> Base; +// is_same<Scalar,typename NumTraits<Scalar>::Real>::value> Base; // using Base::operator+; // using Base::operator+=; diff --git a/unsupported/Eigen/src/Skyline/SkylineProduct.h b/unsupported/Eigen/src/Skyline/SkylineProduct.h index 5a374743f..d7c536880 100644 --- a/unsupported/Eigen/src/Skyline/SkylineProduct.h +++ b/unsupported/Eigen/src/Skyline/SkylineProduct.h @@ -65,9 +65,9 @@ struct internal::traits<SkylineProduct<LhsNested, RhsNested, ProductMode> > { CoeffReadCost = Dynamic }; - typedef typename internal::meta_if<ResultIsSkyline, + typedef typename internal::conditional<ResultIsSkyline, SkylineMatrixBase<SkylineProduct<LhsNested, RhsNested, ProductMode> >, - MatrixBase<SkylineProduct<LhsNested, RhsNested, ProductMode> > >::ret Base; + MatrixBase<SkylineProduct<LhsNested, RhsNested, ProductMode> > >::type Base; }; namespace internal { diff --git a/unsupported/Eigen/src/SparseExtra/CholmodSupport.h b/unsupported/Eigen/src/SparseExtra/CholmodSupport.h index aee4ae00a..a5333bb70 100644 --- a/unsupported/Eigen/src/SparseExtra/CholmodSupport.h +++ b/unsupported/Eigen/src/SparseExtra/CholmodSupport.h @@ -30,22 +30,22 @@ namespace internal { template<typename Scalar, typename CholmodType> void cholmod_configure_matrix(CholmodType& mat) { - if (is_same_type<Scalar,float>::ret) + if (is_same<Scalar,float>::value) { mat.xtype = CHOLMOD_REAL; mat.dtype = CHOLMOD_SINGLE; } - else if (is_same_type<Scalar,double>::ret) + else if (is_same<Scalar,double>::value) { mat.xtype = CHOLMOD_REAL; mat.dtype = CHOLMOD_DOUBLE; } - else if (is_same_type<Scalar,std::complex<float> >::ret) + else if (is_same<Scalar,std::complex<float> >::value) { mat.xtype = CHOLMOD_COMPLEX; mat.dtype = CHOLMOD_SINGLE; } - else if (is_same_type<Scalar,std::complex<double> >::ret) + else if (is_same<Scalar,std::complex<double> >::value) { mat.xtype = CHOLMOD_COMPLEX; mat.dtype = CHOLMOD_DOUBLE; diff --git a/unsupported/Eigen/src/SparseExtra/SuperLUSupport.h b/unsupported/Eigen/src/SparseExtra/SuperLUSupport.h index 31a0ee509..a3e2de82e 100644 --- a/unsupported/Eigen/src/SparseExtra/SuperLUSupport.h +++ b/unsupported/Eigen/src/SparseExtra/SuperLUSupport.h @@ -134,13 +134,13 @@ struct SluMatrix : SuperMatrix template<typename Scalar> void setScalarType() { - if (internal::is_same_type<Scalar,float>::ret) + if (internal::is_same<Scalar,float>::value) Dtype = SLU_S; - else if (internal::is_same_type<Scalar,double>::ret) + else if (internal::is_same<Scalar,double>::value) Dtype = SLU_D; - else if (internal::is_same_type<Scalar,std::complex<float> >::ret) + else if (internal::is_same<Scalar,std::complex<float> >::value) Dtype = SLU_C; - else if (internal::is_same_type<Scalar,std::complex<double> >::ret) + else if (internal::is_same<Scalar,std::complex<double> >::value) Dtype = SLU_Z; else { diff --git a/unsupported/test/polynomialsolver.cpp b/unsupported/test/polynomialsolver.cpp index 9ba59ba2a..dd55f8b36 100644 --- a/unsupported/test/polynomialsolver.cpp +++ b/unsupported/test/polynomialsolver.cpp @@ -74,7 +74,7 @@ bool aux_evalSolver( const POLYNOMIAL& pols, SOLVER& psolve ) } #ifdef HAS_GSL - if (internal::is_same_type< Scalar, double>::ret) + if (internal::is_same< Scalar, double>::value) { typedef GslTraits<Scalar> Gsl; RootsType gslRoots(deg); diff --git a/unsupported/test/sparse_extra.cpp b/unsupported/test/sparse_extra.cpp index 84dfbdda6..a004995f6 100644 --- a/unsupported/test/sparse_extra.cpp +++ b/unsupported/test/sparse_extra.cpp @@ -87,7 +87,7 @@ template<typename SparseMatrixType> void sparse_extra(const SparseMatrixType& re for (int i=0; i<(int)zeroCoords.size(); ++i) { VERIFY_IS_MUCH_SMALLER_THAN( m.coeff(zeroCoords[i].x(),zeroCoords[i].y()), eps ); - if(internal::is_same_type<SparseMatrixType,SparseMatrix<Scalar,Flags> >::ret) + if(internal::is_same<SparseMatrixType,SparseMatrix<Scalar,Flags> >::value) VERIFY_RAISES_ASSERT( m.coeffRef(zeroCoords[0].x(),zeroCoords[0].y()) = 5 ); } VERIFY_IS_APPROX(m, refMat); |