aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/StlSupport
diff options
context:
space:
mode:
authorGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-12-02 12:33:15 +0100
committerGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-12-02 12:33:15 +0100
commita289065c739e7ee9926feadd6ca9bf6fd232669b (patch)
tree54c01bfc0b4d62e78f5e1b2570334ac812e69fa0 /Eigen/src/StlSupport
parent59b944cb50453d64e7a3243a01301d3207863f6d (diff)
Applied a fix to our std::vector specialization which prevents the usage of workaround_msvc_stl_support when T is not a class.
Diffstat (limited to 'Eigen/src/StlSupport')
-rw-r--r--Eigen/src/StlSupport/details.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/Eigen/src/StlSupport/details.h b/Eigen/src/StlSupport/details.h
index d3dbe0be8..397c8ef85 100644
--- a/Eigen/src/StlSupport/details.h
+++ b/Eigen/src/StlSupport/details.h
@@ -66,7 +66,13 @@ namespace Eigen {
// sometimes, MSVC detects, at compile time, that the argument x
// in std::vector::resize(size_t s,T x) won't be aligned and generate an error
// even if this function is never called. Whence this little wrapper.
-#define EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T) Eigen::internal::workaround_msvc_stl_support<T>
+#define EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T) \
+ typename Eigen::internal::conditional< \
+ Eigen::internal::is_arithmetic<T>::value, \
+ T, \
+ Eigen::internal::workaround_msvc_stl_support<T> \
+ >::type
+
namespace internal {
template<typename T> struct workaround_msvc_stl_support : public T
{