diff options
author | Chun Wang <chun.wang@tdsecurities.com> | 2016-11-17 17:54:27 -0500 |
---|---|---|
committer | Chun Wang <chun.wang@tdsecurities.com> | 2016-11-17 17:54:27 -0500 |
commit | 0d0948c3b9ba484147c373e05cefb91b269ce94e (patch) | |
tree | fff05a4d372ca3684742e832987f2db782d5db91 | |
parent | a1d5c503fad23453d7447ef09bc7d1381d4667cf (diff) |
Workaround for error in VS2012 with /clr
-rwxr-xr-x | Eigen/src/Core/util/Meta.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h index d4460bb77..7f6370755 100755 --- a/Eigen/src/Core/util/Meta.h +++ b/Eigen/src/Core/util/Meta.h @@ -381,12 +381,12 @@ struct has_ReturnType enum { value = sizeof(testFunctor<T>(0)) == sizeof(meta_yes) }; }; -template<typename T> const T& return_ref(); +template<typename T> const T* return_ptr(); template <typename T, typename IndexType=Index> struct has_nullary_operator { - template <typename C> static meta_yes testFunctor(C const *,typename enable_if<(sizeof(return_ref<C>().operator()())>0)>::type * = 0); + template <typename C> static meta_yes testFunctor(C const *,typename enable_if<(sizeof(return_ptr<C>()->operator()())>0)>::type * = 0); static meta_no testFunctor(...); enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) }; @@ -395,7 +395,7 @@ struct has_nullary_operator template <typename T, typename IndexType=Index> struct has_unary_operator { - template <typename C> static meta_yes testFunctor(C const *,typename enable_if<(sizeof(return_ref<C>().operator()(IndexType(0)))>0)>::type * = 0); + template <typename C> static meta_yes testFunctor(C const *,typename enable_if<(sizeof(return_ptr<C>()->operator()(IndexType(0)))>0)>::type * = 0); static meta_no testFunctor(...); enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) }; @@ -404,7 +404,7 @@ struct has_unary_operator template <typename T, typename IndexType=Index> struct has_binary_operator { - template <typename C> static meta_yes testFunctor(C const *,typename enable_if<(sizeof(return_ref<C>().operator()(IndexType(0),IndexType(0)))>0)>::type * = 0); + template <typename C> static meta_yes testFunctor(C const *,typename enable_if<(sizeof(return_ptr<C>()->operator()(IndexType(0),IndexType(0)))>0)>::type * = 0); static meta_no testFunctor(...); enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) }; |