diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h index 96563962e..29c149c34 100755 --- a/Eigen/src/Core/util/Meta.h +++ b/Eigen/src/Core/util/Meta.h @@ -381,13 +381,13 @@ struct has_ReturnType enum { value = sizeof(testFunctor(0)) == sizeof(meta_yes) }; }; -template struct integral_constant { static const int value = Val; }; +template struct meta_array { int a[Size]; }; template const T& return_ref(); template struct has_nullary_operator { - template static meta_yes testFunctor(C const *,integral_constant< sizeof(return_ref()()) > * = 0); + template static meta_yes testFunctor(C const *,meta_array< sizeof(return_ref()()) > * = 0); static meta_no testFunctor(...); enum { value = sizeof(testFunctor(static_cast(0))) == sizeof(meta_yes) }; @@ -396,7 +396,7 @@ struct has_nullary_operator template struct has_unary_operator { - template static meta_yes testFunctor(C const *,integral_constant< sizeof(return_ref()(Index(0))) > * = 0); + template static meta_yes testFunctor(C const *,meta_array< sizeof(return_ref()(Index(0))) > * = 0); static meta_no testFunctor(...); enum { value = sizeof(testFunctor(static_cast(0))) == sizeof(meta_yes) }; @@ -405,7 +405,7 @@ struct has_unary_operator template struct has_binary_operator { - template static meta_yes testFunctor(C const *,integral_constant< sizeof(return_ref()(Index(0),Index(0))) > * = 0); + template static meta_yes testFunctor(C const *,meta_array< sizeof(return_ref()(Index(0),Index(0))) > * = 0); static meta_no testFunctor(...); enum { value = sizeof(testFunctor(static_cast(0))) == sizeof(meta_yes) };