title: Use of 'auto func(int)' before deduction of 'auto' in C++14
body: <p>I have compiled following program in GCC using <code>C++14</code>. </p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  auto func(int i);
  
  int main() 
  {
      auto ret = func(5);
      return 0;
  }
  
  auto func(int i) 
  {
    if (i == 1)
      return i;              
    else
      return func(i-1) + i;  
  }
  </code></pre>
  
  <p>But, I get the following error.</p>
  
  <blockquote>
  <pre><code>In function 'int main()': 8:16: error: use of 'auto func(int)' before
  deduction of 'auto'
   auto ret = func(5);
  </code></pre>
  </blockquote>
  
  <p>So, what am I missing here?</p>