MSVC-2010 is making problems with SFINAE again. But restricting to the variant for very old compilers (enum, template<typename C> for both function definitions) fixes the problem.

This commit is contained in:
klimpel 2016-07-28 15:58:17 +01:00
parent c52c8d76da
commit ca5effa16c

View File

@ -365,10 +365,10 @@ struct has_ReturnType
typedef char yes[1];
typedef char no[2];
template <typename C> static yes& testFunctor(C const *, typename C::ReturnType const * = 0);
static no& testFunctor(...);
template <typename C> static yes& testFunctor(typename C::ReturnType const *);
template <typename C> static no& testFunctor(...);
static const bool value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(yes);
enum { value = sizeof(testFunctor<T>(0)) == sizeof(yes) };
};
/** \internal In short, it computes int(sqrt(\a Y)) with \a Y an integer.