title: c++ type inference recursive functions
body: <p>Trying to understand why the type deduction is failing here with conditional operator.<br>
  Something in the standard trying to prevent type deduction in this case? Any pointers to understand this would be great. </p>
  
  <pre><code>auto mfact(int i)
  {
      return (0==i) ? 1 : i * mfact(i-1);
  }
  
  auto mfact2(int i)
  {
      if (0 == i)
          return 1;
  
      else
          return i * mfact2(i-1);
  }
  </code></pre>
  
  <blockquote>
  <pre><code>error: use of ‘auto mfact(int)’ before deduction of ‘auto’    
      return (0==i) ? 1 : i * mfact(i-1);
  </code></pre>
  </blockquote>