Go to the documentation of this file.
25 #ifndef __MLPACK_CORE_SFINAE_UTILITY
26 #define __MLPACK_CORE_SFINAE_UTILITY
28 #include <boost/utility/enable_if.hpp>
29 #include <boost/type_traits.hpp>
51 #define HAS_MEM_FUNC(FUNC, NAME) \
52 template<typename T, typename sig> \
54 typedef char yes[1]; \
55 typedef char no [2]; \
56 template<typename U, U> struct type_check; \
57 template<typename _1> static yes &chk(type_check<sig, &_1::FUNC> *); \
58 template<typename > static no &chk(...); \
59 static bool const value = sizeof(chk<T>(0)) == sizeof(yes); \