Fixed decltype missed

pull/123/head
Hieromon Ikasamo 6 years ago
parent 9e778b651d
commit c585720d27
  1. 20
      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<typename T> \
struct has_func_##func { \
private: \
typedef char one; \
typedef long two; \
template<typename U> static one test(typeof(&U::func)); \
template<typename U> static two test(...); \
public: \
enum { value = sizeof(test<T>(0)) == sizeof(char) }; \
#define AC_HAS_FUNC(func) \
template<typename T> \
struct has_func_##func { \
private: \
typedef char one; \
typedef long two; \
template<typename U> static one test(decltype(&U::func)); \
template<typename U> static two test(...); \
public: \
enum { value = sizeof(test<T>(0)) == sizeof(char) }; \
}
#endif // _AUTOCONNECTDEFS_H_

Loading…
Cancel
Save