Checking whether a template argument has a member function [duplicate]
问题 This question already has answers here : Closed 9 years ago . Possible Duplicate: Is it possible to write a C++ template to check for a function's existence? This is very similar to my earlier question. I want to check whether a template argument contains a member function or not. I tried this code similar to that in the accepted answer in my previous question. struct A { int member_func(); }; struct B { }; template<typename T> struct has_member_func { template<typename C> static char func(??