diff --git a/Eigen/src/Core/ForceAlignedAccess.h b/Eigen/src/Core/ForceAlignedAccess.h index 2a6f1cf4e..11c1f8f70 100644 --- a/Eigen/src/Core/ForceAlignedAccess.h +++ b/Eigen/src/Core/ForceAlignedAccess.h @@ -137,7 +137,7 @@ MatrixBase::forceAlignedAccess() */ template template -inline typename internal::add_const,Derived&>::type>::type +inline typename internal::add_const_on_value_type,Derived&>::type>::type MatrixBase::forceAlignedAccessIf() const { return derived(); diff --git a/Eigen/src/Core/Functors.h b/Eigen/src/Core/Functors.h index f2aaea145..69f17fb73 100644 --- a/Eigen/src/Core/Functors.h +++ b/Eigen/src/Core/Functors.h @@ -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(m_other)); } - typename add_const::Nested>::type m_other; + typename add_const_on_value_type::Nested>::type m_other; }; template struct functor_traits > @@ -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 add_const::Nested>::type m_other; + typename add_const_on_value_type::Nested>::type m_other; }; template struct functor_traits > @@ -458,7 +458,7 @@ struct scalar_quotient1_impl { 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 add_const::Nested>::type m_other; + typename add_const_on_value_type::Nested>::type m_other; }; template struct functor_traits > diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index 6651b6535..1f7643d64 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -163,7 +163,7 @@ struct real_ref_retval }; template -inline typename add_const< EIGEN_MATHFUNC_RETVAL(real_ref, Scalar) >::type real_ref(const Scalar& x) +inline typename add_const_on_value_type< EIGEN_MATHFUNC_RETVAL(real_ref, Scalar) >::type real_ref(const Scalar& x) { return real_ref_impl::run(x); } @@ -215,7 +215,7 @@ struct imag_ref_retval }; template -inline typename add_const< EIGEN_MATHFUNC_RETVAL(imag_ref, Scalar) >::type imag_ref(const Scalar& x) +inline typename add_const_on_value_type< EIGEN_MATHFUNC_RETVAL(imag_ref, Scalar) >::type imag_ref(const Scalar& x) { return imag_ref_impl::run(x); } diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index a1b84bd94..0dca72dbd 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -277,7 +277,7 @@ template class MatrixBase inline const ForceAlignedAccess forceAlignedAccess() const; inline ForceAlignedAccess forceAlignedAccess(); - template inline typename internal::add_const,Derived&>::type>::type forceAlignedAccessIf() const; + template inline typename internal::add_const_on_value_type,Derived&>::type>::type forceAlignedAccessIf() const; template inline typename internal::conditional,Derived&>::type forceAlignedAccessIf(); Scalar trace() const; diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h index bb9a66cf1..2c8ee26a1 100644 --- a/Eigen/src/Core/util/Meta.h +++ b/Eigen/src/Core/util/Meta.h @@ -54,10 +54,10 @@ template struct remove_pointer { typedef T type; }; template struct remove_pointer { typedef T type; }; template struct remove_pointer { typedef T type; }; -template struct remove_const { typedef T type; }; -template struct remove_const { typedef T type; }; -template struct remove_const { typedef T & type; }; -template struct remove_const { typedef T * type; }; +template struct remove_const_on_value_type { typedef T type; }; +template struct remove_const_on_value_type { typedef T type; }; +template struct remove_const_on_value_type { typedef T & type; }; +template struct remove_const_on_value_type { typedef T * type; }; template struct remove_all { typedef T type; }; template struct remove_all { typedef typename remove_all::type type; }; @@ -83,16 +83,16 @@ template<> struct is_arithmetic { enum { value = true }; }; template<> struct is_arithmetic { enum { value = true }; }; template<> struct is_arithmetic { enum { value = true }; }; -template struct add_const { typedef const T type; }; -template struct add_const { typedef const T type; }; -template struct add_const { typedef const T& type; }; -template struct add_const { typedef const T& type; }; -template struct add_const { typedef const T* type; }; -template struct add_const { typedef const T* type; }; +template struct add_const_on_value_type { typedef const T type; }; +template struct add_const_on_value_type { typedef const T type; }; +template struct add_const_on_value_type { typedef const T& type; }; +template struct add_const_on_value_type { typedef const T& type; }; +template struct add_const_on_value_type { typedef const T* type; }; +template struct add_const_on_value_type { typedef const T* type; }; template struct makeconst_return_type { - typedef typename conditional::value, T, typename add_const::type>::type type; + typedef typename conditional::value, T, typename add_const_on_value_type::type>::type type; }; /** \internal Allows to enable/disable an overload diff --git a/test/meta.cpp b/test/meta.cpp index 9adb95034..2c3c2985a 100644 --- a/test/meta.cpp +++ b/test/meta.cpp @@ -43,11 +43,11 @@ void test_meta() VERIFY(( internal::is_same::type >::value)); VERIFY(( internal::is_same::type >::value)); - VERIFY(( internal::is_same::type >::value)); - VERIFY(( internal::is_same::type >::value)); - VERIFY(( internal::is_same::type >::value)); + VERIFY(( internal::is_same::type >::value)); + VERIFY(( internal::is_same::type >::value)); + VERIFY(( internal::is_same::type >::value)); - VERIFY(( internal::is_same::type >::value)); + VERIFY(( internal::is_same::type >::value)); VERIFY(( internal::is_same::type >::value)); VERIFY(( internal::is_same::type >::value)); VERIFY(( internal::is_same::type >::value));