diff --git a/src/AutoConnectDefs.h b/src/AutoConnectDefs.h index 667619f..1f56855 100644 --- a/src/AutoConnectDefs.h +++ b/src/AutoConnectDefs.h @@ -205,16 +205,16 @@ // The purpose of this macro is to avoid the use of invalid member // functions due to differences in the version of the library which // AutoConnect depends on. -#define AC_HAS_FUNC(func) \ -template \ -struct has_func_##func { \ - private: \ - typedef char one; \ - typedef long two; \ - template static one test(typeof(&U::func)); \ - template static two test(...); \ - public: \ - enum { value = sizeof(test(0)) == sizeof(char) }; \ +#define AC_HAS_FUNC(func) \ +template \ +struct has_func_##func { \ + private: \ + typedef char one; \ + typedef long two; \ + template static one test(decltype(&U::func)); \ + template static two test(...); \ + public: \ + enum { value = sizeof(test(0)) == sizeof(char) }; \ } #endif // _AUTOCONNECTDEFS_H_