Check if class has function with signature
问题 There are other answers on this site using SFINAE but with non C++11 code, and there are others using C++11 code like decltypes to make this process easier. However, I am not sure how to check if a class has a function with a specific signature. I want to check if a class has the function receive(const Event &) where Event is a class type that is specified when calling the check function. 回答1: The best way I know of is checking if you can actually call the function and if it returns the type