title: How to find out if a type has member function with any return type?
body: <p>I need to find out if a give type has function X as a callable function with a given parameter list. The check should <em>not</em> care about the return value however.</p>
  
  <p>I found <a href="http://ideone.com/ZLGp4R" rel="nofollow noreferrer">this solution</a> from <a href="https://stackoverflow.com/questions/17201329/c11-ways-of-finding-if-a-type-has-member-function-or-supports-operator">another Stack Overflow question</a> which seems to work well. What it does is this:</p>
  
  <pre><code>#include &lt;type_traits&gt;
  
  template &lt;typename C, typename F, typename = void&gt;
  struct is_call_possible : public std::false_type {};
  
  template &lt;typename C, typename R, typename... A&gt;
  struct is_call_possible&lt;C, R(A...),
      typename std::enable_if&lt;
          std::is_same&lt;R, void&gt;::value ||
          std::is_convertible&lt;decltype(
              std::declval&lt;C&gt;().operator()(std::declval&lt;A&gt;()...)
          ), R&gt;::value
      &gt;::type
  &gt; : public std::true_type {};
  </code></pre>
  
  <p>This is exactly what I want except that in the check you also supply the desired return type. I was trying to find out a way to modify this to be able to check without taking the return type into account but I couldn't figure out a way.</p>
  
  <p>Does anyone know how to do this?</p>