diff options
author | Gael Guennebaud <g.gael@free.fr> | 2016-09-05 15:50:41 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2016-09-05 15:50:41 +0200 |
commit | e13071dd13233b5d07e725453617c40421cf7501 (patch) | |
tree | 45b6dd14f402e6c217e2a22116716805b6e8095b /Eigen/src/Core/util/Meta.h | |
parent | d123717e21d6b0d073b3bf7ef96eae7c0651b3b3 (diff) |
Workaround a weird msvc 2012 compilation error.
Diffstat (limited to 'Eigen/src/Core/util/Meta.h')
-rwxr-xr-x | Eigen/src/Core/util/Meta.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h index bbef83ea8..d4460bb77 100755 --- a/Eigen/src/Core/util/Meta.h +++ b/Eigen/src/Core/util/Meta.h @@ -383,7 +383,7 @@ struct has_ReturnType template<typename T> const T& return_ref(); -template <typename T> +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); @@ -392,19 +392,19 @@ struct has_nullary_operator enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) }; }; -template <typename T> +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()(Index(0)))>0)>::type * = 0); + template <typename C> static meta_yes testFunctor(C const *,typename enable_if<(sizeof(return_ref<C>().operator()(IndexType(0)))>0)>::type * = 0); static meta_no testFunctor(...); enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) }; }; -template <typename T> +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()(Index(0),Index(0)))>0)>::type * = 0); + template <typename C> static meta_yes testFunctor(C const *,typename enable_if<(sizeof(return_ref<C>().operator()(IndexType(0),IndexType(0)))>0)>::type * = 0); static meta_no testFunctor(...); enum { value = sizeof(testFunctor(static_cast<T*>(0))) == sizeof(meta_yes) }; |