Go to the documentation of this file. 15 #ifndef MLPACK_CORE_SFINAE_UTILITY 16 #define MLPACK_CORE_SFINAE_UTILITY 18 #include <boost/utility/enable_if.hpp> 19 #include <boost/type_traits.hpp> 40 #define HAS_MEM_FUNC(FUNC, NAME) \ 41 template<typename T, typename sig> \ 43 typedef char yes[1]; \ 44 typedef char no [2]; \ 45 template<typename U, U> struct type_check; \ 46 template<typename _1> static yes &chk(type_check<sig, &_1::FUNC> *); \ 47 template<typename > static no &chk(...); \ 48 static bool const value = sizeof(chk<T>(0)) == sizeof(yes); \