From a289065c739e7ee9926feadd6ca9bf6fd232669b Mon Sep 17 00:00:00 2001 From: Hauke Heibel Date: Thu, 2 Dec 2010 12:33:15 +0100 Subject: Applied a fix to our std::vector specialization which prevents the usage of workaround_msvc_stl_support when T is not a class. --- Eigen/src/StlSupport/details.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Eigen/src/StlSupport') 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 +#define EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T) \ + typename Eigen::internal::conditional< \ + Eigen::internal::is_arithmetic::value, \ + T, \ + Eigen::internal::workaround_msvc_stl_support \ + >::type + namespace internal { template struct workaround_msvc_stl_support : public T { -- cgit v1.2.3