aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/StlSupport
diff options
context:
space:
mode:
authorGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2015-08-14 16:09:48 +0200
committerGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2015-08-14 16:09:48 +0200
commit712e2fed1705746847d1cbdce01094eb42a45139 (patch)
treec127dd4f56c23afc091331c1adc82b748735e2ec /Eigen/src/StlSupport
parenta5d1bb2be8340e446d6f8ce24e0b1a8987e9be95 (diff)
bug #829: Introduce macro EIGEN_HAS_CXX11_CONTAINERS and do not specialize std-containers if it is enabled.
Diffstat (limited to 'Eigen/src/StlSupport')
-rw-r--r--Eigen/src/StlSupport/StdDeque.h2
-rw-r--r--Eigen/src/StlSupport/StdList.h4
-rw-r--r--Eigen/src/StlSupport/StdVector.h5
3 files changed, 8 insertions, 3 deletions
diff --git a/Eigen/src/StlSupport/StdDeque.h b/Eigen/src/StlSupport/StdDeque.h
index 909600476..25930cb85 100644
--- a/Eigen/src/StlSupport/StdDeque.h
+++ b/Eigen/src/StlSupport/StdDeque.h
@@ -53,7 +53,7 @@ namespace std \
}
// check whether we really need the std::deque specialization
-#if !(defined(_GLIBCXX_DEQUE) && (!EIGEN_GNUC_AT_LEAST(4,1))) /* Note that before gcc-4.1 we already have: std::deque::resize(size_type,const T&). */
+#if !EIGEN_HAS_CXX11_CONTAINERS && !(defined(_GLIBCXX_DEQUE) && (!EIGEN_GNUC_AT_LEAST(4,1))) /* Note that before gcc-4.1 we already have: std::deque::resize(size_type,const T&). */
namespace std {
diff --git a/Eigen/src/StlSupport/StdList.h b/Eigen/src/StlSupport/StdList.h
index 265b46f8e..7412b50aa 100644
--- a/Eigen/src/StlSupport/StdList.h
+++ b/Eigen/src/StlSupport/StdList.h
@@ -51,8 +51,8 @@ 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::list::resize(size_type,const T&). */
+// check whether we really need the std::list specialization
+#if !EIGEN_HAS_CXX11_CONTAINERS && !(defined(_GLIBCXX_LIST) && (!EIGEN_GNUC_AT_LEAST(4,1))) /* Note that before gcc-4.1 we already have: std::list::resize(size_type,const T&). */
namespace std
{
diff --git a/Eigen/src/StlSupport/StdVector.h b/Eigen/src/StlSupport/StdVector.h
index 611664a2e..ec22821d2 100644
--- a/Eigen/src/StlSupport/StdVector.h
+++ b/Eigen/src/StlSupport/StdVector.h
@@ -44,6 +44,9 @@ namespace std \
}; \
}
+// Don't specialize if containers are implemented according to C++11
+#if !EIGEN_HAS_CXX11_CONTAINERS
+
namespace std {
#define EIGEN_STD_VECTOR_SPECIALIZATION_BODY \
@@ -122,5 +125,7 @@ namespace std {
#endif
};
}
+#endif // !EIGEN_HAS_CXX11_CONTAINERS
+
#endif // EIGEN_STDVECTOR_H