mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 11:49:02 +08:00
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:
parent
c52c8d76da
commit
ca5effa16c
@ -365,10 +365,10 @@ struct has_ReturnType
|
|||||||
typedef char yes[1];
|
typedef char yes[1];
|
||||||
typedef char no[2];
|
typedef char no[2];
|
||||||
|
|
||||||
template <typename C> static yes& testFunctor(C const *, typename C::ReturnType const * = 0);
|
template <typename C> static yes& testFunctor(typename C::ReturnType const *);
|
||||||
static no& testFunctor(...);
|
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.
|
/** \internal In short, it computes int(sqrt(\a Y)) with \a Y an integer.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user