From ca5effa16cd7ed90f0e56084b291e5a2a63a5172 Mon Sep 17 00:00:00 2001 From: klimpel Date: Thu, 28 Jul 2016 15:58:17 +0100 Subject: [PATCH] MSVC-2010 is making problems with SFINAE again. But restricting to the variant for very old compilers (enum, template for both function definitions) fixes the problem. --- Eigen/src/Core/util/Meta.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h index 4b35761e0..b9beb6eb7 100755 --- a/Eigen/src/Core/util/Meta.h +++ b/Eigen/src/Core/util/Meta.h @@ -365,10 +365,10 @@ struct has_ReturnType typedef char yes[1]; typedef char no[2]; - template static yes& testFunctor(C const *, typename C::ReturnType const * = 0); - static no& testFunctor(...); + template static yes& testFunctor(typename C::ReturnType const *); + template static no& testFunctor(...); - static const bool value = sizeof(testFunctor(static_cast(0))) == sizeof(yes); + enum { value = sizeof(testFunctor(0)) == sizeof(yes) }; }; /** \internal In short, it computes int(sqrt(\a Y)) with \a Y an integer.