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