title: template deduction with SFINAE in c++
body: <p>I'm new to SFINAE. i have noticed that:</p>
  
  <pre><code>template &lt;typename T&gt; void f(T t) { t.Crash(); } // version 1
  void f(...) { } // The sink.
  f(1);
  
  template &lt;typename T&gt; void f(const T&amp; t, typename T::iterator* it = nullptr) { } // version 2
  void f(...) { } // The sink.
  f(1);
  </code></pre>
  
  <p>in version 2, because of SFINAE, it will not throw any error, and choose the ellipse sink. but why at version 1, the compiler will stop and complain? </p>
  
  <p>Does the SFINAE only apply to the signature not the body? so in version 1, it prefers the template function, but at what stage does the compiler stop and throw an error? </p>
  
  <p>please explain explicitly the <strong>processing stages</strong> of compiler regarding the template overload resolution.</p>