title: Checking if non-member function that accepts T param exists
body: <p>I want to check if a non-member function that accepts a T parameter type exists. To do so I used <code>void_t</code> "trick" presented by Mr. Walter E. Brown at cppcon(same trick works without any problems to check if a member type or member function exists). </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;type_traits&gt;
  
  template&lt;typename...&gt;
  using void_t = void;
  
  void Serialize(float&amp;)
  {
  }
  
  template&lt;typename T, typename = void&gt;
  struct has_external_serialize : std::false_type
  {
  };
  
  template&lt;typename T&gt;
  struct has_external_serialize&lt;T, void_t&lt;decltype(Serialize(std::declval&lt;T&amp;&gt;()))&gt;&gt; : std::true_type
  {
  };
  
  void Serialize(int&amp;)
  {
  }
  
  int main(int argc, const char * argv[])
  {
      std::cout&lt;&lt;has_external_serialize&lt;float&gt;::value&lt;&lt;has_external_serialize&lt;int&gt;::value;
  }
  </code></pre>
  
  <p>This code prints <code>11</code> when compiled using GCC and <code>10</code> when compiled with clang(xcode 5.1.1). </p>
  
  <p>My questions is - is this code correct? If yes, is there a bug in clang or a bug in GCC or the code is in some "implementation defined" area and I can't assume it will have same behaviour on all platforms? </p>