mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-30 07:44:10 +08:00
Fix compilation with visual studio
This commit is contained in:
parent
221f619bea
commit
3d946e42b3
@ -381,13 +381,12 @@ struct has_ReturnType
|
|||||||
enum { value = sizeof(testFunctor<T>(0)) == sizeof(meta_yes) };
|
enum { value = sizeof(testFunctor<T>(0)) == sizeof(meta_yes) };
|
||||||
};
|
};
|
||||||
|
|
||||||
template<int Size> struct meta_array { int a[Size]; };
|
|
||||||
template<typename T> const T& return_ref();
|
template<typename T> const T& return_ref();
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct has_nullary_operator
|
struct has_nullary_operator
|
||||||
{
|
{
|
||||||
template <typename C> static meta_yes testFunctor(C const *,meta_array< sizeof(return_ref<C>()()) > * = 0);
|
template <typename C> static meta_yes testFunctor(C const *,enable_if<(sizeof(return_ref<C>()())>0)> * = 0);
|
||||||
static meta_no testFunctor(...);
|
static meta_no testFunctor(...);
|
||||||
|
|
||||||
enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) };
|
enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) };
|
||||||
@ -396,7 +395,7 @@ struct has_nullary_operator
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
struct has_unary_operator
|
struct has_unary_operator
|
||||||
{
|
{
|
||||||
template <typename C> static meta_yes testFunctor(C const *,meta_array< sizeof(return_ref<C>()(Index(0))) > * = 0);
|
template <typename C> static meta_yes testFunctor(C const *,enable_if<(sizeof(return_ref<C>()(Index(0)))>0)> * = 0);
|
||||||
static meta_no testFunctor(...);
|
static meta_no testFunctor(...);
|
||||||
|
|
||||||
enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) };
|
enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) };
|
||||||
@ -405,7 +404,7 @@ struct has_unary_operator
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
struct has_binary_operator
|
struct has_binary_operator
|
||||||
{
|
{
|
||||||
template <typename C> static meta_yes testFunctor(C const *,meta_array< sizeof(return_ref<C>()(Index(0),Index(0))) > * = 0);
|
template <typename C> static meta_yes testFunctor(C const *,enable_if<(sizeof(return_ref<C>()(Index(0),Index(0)))>0)> * = 0);
|
||||||
static meta_no testFunctor(...);
|
static meta_no testFunctor(...);
|
||||||
|
|
||||||
enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) };
|
enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user