Run Code | API | Code Wall | Misc | Feedback | Login | Theme | Privacy | Patreon |
How to test call member?Error(s): source_file.cpp:14:68: error: no member named 'call' in 'C' static auto test(Args... args ) -> decltype( std::declval<T>().call(args...) ); ~~~~~~~~~~~~~~~~~ ^ source_file.cpp:30:22: note: in instantiation of template class 'Has_Call<C>' requested here typedef decltype(Has_Call<T>::test(args...)) R; ^ source_file.cpp:58:28: note: in instantiation of function template specialization 'hasCall<C>' requested here std::cout << "C " << (hasCall<C>() ? "has " : "not have ") << " int call() member function" << std::endl; ^ 1 error generated. |