aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/StlSupport
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2010-10-13 10:21:28 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2010-10-13 10:21:28 +0200
commit3a2bb7f78256df94f4b53e87f1b9d203965b1e4d (patch)
tree77ca60bc076659efcbaab8fa6a8c9281024300cf /Eigen/src/StlSupport
parentbf402dd9b86290a654bdc47a706ad4b9ccc56d4d (diff)
fix compilation and warnings with fcc 4.0.1
Diffstat (limited to 'Eigen/src/StlSupport')
-rw-r--r--Eigen/src/StlSupport/StdVector.h12
1 files changed, 7 insertions, 5 deletions
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