diff --git a/include/vectorwrapper/has_method.hpp b/include/vectorwrapper/has_method.hpp index 5deb031..d3eda22 100644 --- a/include/vectorwrapper/has_method.hpp +++ b/include/vectorwrapper/has_method.hpp @@ -45,10 +45,11 @@ private: \ struct TrueType { int a[2]; }; \ typedef int FalseType; \ - template static TrueType has_enum ( int = C::enum_name ); \ + template void f ( void ); \ + template static TrueType has_enum ( decltype(&f) = nullptr ); \ template static FalseType has_enum ( ... ); \ public:\ - enum { value = sizeof(has_enum(0)) == sizeof(TrueType) }; \ + enum { value = sizeof(has_enum(nullptr)) == sizeof(TrueType) }; \ } #endif