aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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
{