From 3a2bb7f78256df94f4b53e87f1b9d203965b1e4d Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 13 Oct 2010 10:21:28 +0200 Subject: fix compilation and warnings with fcc 4.0.1 --- Eigen/src/StlSupport/StdVector.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Eigen/src/StlSupport') diff --git a/Eigen/src/StlSupport/StdVector.h b/Eigen/src/StlSupport/StdVector.h index 9786bac34..81a2d7762 100644 --- a/Eigen/src/StlSupport/StdVector.h +++ b/Eigen/src/StlSupport/StdVector.h @@ -67,9 +67,6 @@ namespace std \ }; \ } -// check whether we really need the std::vector specialization -#if !(defined(_GLIBCXX_VECTOR) && (!EIGEN_GNUC_AT_LEAST(4,1))) /* Note that before gcc-4.1 we already have: std::vector::resize(size_type,const T&). */ - namespace std { #define EIGEN_STD_VECTOR_SPECIALIZATION_BODY \ @@ -119,6 +116,13 @@ namespace std { { return vector_base::insert(position,x); } void insert(const_iterator position, size_type new_size, const value_type& x) { vector_base::insert(position, new_size, x); } +#elif defined(_GLIBCXX_VECTOR) && (!(EIGEN_GNUC_AT_LEAST(4,1))) + /* Note that before gcc-4.1 we already have: std::vector::resize(size_type,const T&). + * However, this specialization is still needed to make the above EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION trick to work. */ + void resize(size_type new_size, const value_type& x) + { + vector_base::resize(new_size,x); + } #elif defined(_GLIBCXX_VECTOR) && EIGEN_GNUC_AT_LEAST(4,2) // workaround GCC std::vector implementation void resize(size_type new_size, const value_type& x) @@ -142,6 +146,4 @@ namespace std { }; } -#endif // check whether specialization is actually required - #endif // EIGEN_STDVECTOR_H -- cgit v1.2.3