aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/util/Meta.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2017-03-17 17:33:15 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2017-03-17 17:33:15 +0100
commitaae19c70ac273a2d40daf18a3cd15c0b0075662b (patch)
tree2384f9e594512170aff431a555cfc2fc5d8264b9 /Eigen/src/Core/util/Meta.h
parentfd7db52f9b3b1227719c6d8281ff5e5198aaae82 (diff)
update has_ReturnType to be more consistent with other has_ helpers
Diffstat (limited to 'Eigen/src/Core/util/Meta.h')
-rwxr-xr-xEigen/src/Core/util/Meta.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h
index 90eda6e70..8de605500 100755
--- a/Eigen/src/Core/util/Meta.h
+++ b/Eigen/src/Core/util/Meta.h
@@ -433,10 +433,10 @@ struct meta_no { char a[2]; };
template <typename T>
struct has_ReturnType
{
- template <typename C> static meta_yes testFunctor(typename C::ReturnType const *);
- template <typename C> static meta_no testFunctor(...);
+ template <typename C> static meta_yes testFunctor(C const *, typename C::ReturnType const * = 0);
+ template <typename C> static meta_no testFunctor(...);
- enum { value = sizeof(testFunctor<T>(0)) == sizeof(meta_yes) };
+ enum { value = sizeof(testFunctor<T>(static_cast<T*>(0))) == sizeof(meta_yes) };
};
template<typename T> const T* return_ptr();