title: SFINAE check failure
body: <p>the following SFINAE test fail to check wether something is a duck (it is a duck if there is a "void quack()" member function). I don't understand why. Any idea ?</p>
  
  <pre><code>struct Duck
  {
      void quack() {}
  };
  
  struct Pig
  {
      void groink() {}
  };
  
  template&lt;class T&gt;
  auto test_duck(const T&amp; t, int)
      -&gt; decltype(t.quack(), bool())
  {
      return true;
  }
  
  template&lt;class T&gt;
  auto test_duck(const T&amp; t, long)
  {
      return false;
  }
  
  template&lt;class T&gt;
  bool is_duck(const T&amp; t)
  {
      return test_duck(t, 0);
  }    
  
  int main()
  {
      Duck duck;
      Pig pig;
  
      cout &lt;&lt; is_duck(duck) &lt;&lt; endl;  
      cout &lt;&lt; is_duck(pig) &lt;&lt; endl;
  }
  </code></pre>