diff --git a/Eigen/Core b/Eigen/Core index e532a00f8..e3c904e81 100644 --- a/Eigen/Core +++ b/Eigen/Core @@ -241,6 +241,8 @@ inline static const char *SimdInstructionSetsInUse(void) { // we use size_t frequently and we'll never remember to prepend it with std:: everytime just to // ensure QNX/QCC support using std::size_t; +// gcc 4.6.0 wants std:: for ptrdiff_t +using std::ptrdiff_t; /** \defgroup Core_Module Core module * This is the main module of Eigen providing dense matrix and vector support diff --git a/Eigen/src/Core/arch/AltiVec/Complex.h b/Eigen/src/Core/arch/AltiVec/Complex.h index 5d16c9430..f8adf1b63 100644 --- a/Eigen/src/Core/arch/AltiVec/Complex.h +++ b/Eigen/src/Core/arch/AltiVec/Complex.h @@ -70,7 +70,7 @@ template<> EIGEN_STRONG_INLINE Packet2cf pset1(const std::complex((const float *)&from); else res.v = ploadu((const float *)&from); diff --git a/Eigen/src/Core/arch/AltiVec/PacketMath.h b/Eigen/src/Core/arch/AltiVec/PacketMath.h index b814712f3..dc34ebbd6 100644 --- a/Eigen/src/Core/arch/AltiVec/PacketMath.h +++ b/Eigen/src/Core/arch/AltiVec/PacketMath.h @@ -296,14 +296,14 @@ template<> EIGEN_STRONG_INLINE Packet4i ploadu(const int* from) template<> EIGEN_STRONG_INLINE Packet4f ploaddup(const float* from) { Packet4f p; - if((std::ptrdiff_t(&from) % 16) == 0) p = pload(from); + if((ptrdiff_t(&from) % 16) == 0) p = pload(from); else p = ploadu(from); return vec_perm(p, p, p16uc_DUPLICATE); } template<> EIGEN_STRONG_INLINE Packet4i ploaddup(const int* from) { Packet4i p; - if((std::ptrdiff_t(&from) % 16) == 0) p = pload(from); + if((ptrdiff_t(&from) % 16) == 0) p = pload(from); else p = ploadu(from); return vec_perm(p, p, p16uc_DUPLICATE); } diff --git a/Eigen/src/StlSupport/details.h b/Eigen/src/StlSupport/details.h index 2698361e8..397c8ef85 100644 --- a/Eigen/src/StlSupport/details.h +++ b/Eigen/src/StlSupport/details.h @@ -38,7 +38,7 @@ namespace Eigen { { public: typedef size_t size_type; - typedef std::ptrdiff_t difference_type; + typedef ptrdiff_t difference_type; typedef T* pointer; typedef const T* const_pointer; typedef T& reference; diff --git a/test/mapstride.cpp b/test/mapstride.cpp index 6c3097485..e2bda99ce 100644 --- a/test/mapstride.cpp +++ b/test/mapstride.cpp @@ -38,7 +38,7 @@ template void map_class_vector(const VectorTy Scalar* a_array = internal::aligned_new(arraysize+1); Scalar* array = a_array; if(Alignment!=Aligned) - array = (Scalar*)(std::ptrdiff_t(a_array) + (internal::packet_traits::AlignedOnScalar?sizeof(Scalar):sizeof(typename NumTraits::Real))); + array = (Scalar*)(ptrdiff_t(a_array) + (internal::packet_traits::AlignedOnScalar?sizeof(Scalar):sizeof(typename NumTraits::Real))); { Map > map(array, size); @@ -77,7 +77,7 @@ template void map_class_matrix(const MatrixTy Scalar* a_array = internal::aligned_new(arraysize+1); Scalar* array = a_array; if(Alignment!=Aligned) - array = (Scalar*)(std::ptrdiff_t(a_array) + (internal::packet_traits::AlignedOnScalar?sizeof(Scalar):sizeof(typename NumTraits::Real))); + array = (Scalar*)(ptrdiff_t(a_array) + (internal::packet_traits::AlignedOnScalar?sizeof(Scalar):sizeof(typename NumTraits::Real))); // test no inner stride and some dynamic outer stride { diff --git a/unsupported/Eigen/FFT b/unsupported/Eigen/FFT index c8f14d845..0b2823058 100644 --- a/unsupported/Eigen/FFT +++ b/unsupported/Eigen/FFT @@ -393,7 +393,7 @@ class FFT for (int k=0;k::Map(x,nx) *= s; else Matrix::MapAligned(x,nx) *= s;