Check if a class has a possibly-overloaded function call operator
问题 I am wondering whether it would be possible to implement a trait in C++20 to check if a type T is such that it has a possibly overloaded/possibly templated function call operator: operator() . // Declaration template <class T> struct has_function_call_operator; // Definition ??? // Variable template template <class T> inline constexpr bool has_function_call_operator_v = has_function_call_operator<T>::value; so that a code such as the following would lead to the correct result: #include