title: C++ deduced return type cannot be used before it is defined
body: <p>Calculator.h</p>
  
  <pre class="lang-cpp prettyprint-override"><code>class Calculator {
      Calculator();
      template&lt;typename... Args&gt;
      static auto add(Args... args);
  };
  </code></pre>
  
  <p>Calculator.cpp</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include "Calculator.h"
  
  Calculator::Calculator() {}
  
  template&lt;typename... Args&gt;
  auto Calculator::add(Args... args) {
      return (args + ... + 0);
  }
  </code></pre>
  
  <p>main.cpp</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;iostream&gt;
  #include "Calculator.h"
  
  int main(){
      Calculator cal;
      std::cout&lt;&lt; cal.add(1,2,3);
  }
  </code></pre>
  
  <blockquote>
    <p>Function 'add&lt;int, int, int>' with deduced return type cannot be used before it is defined</p>
  </blockquote>
  
  <p>If I move the <code>add()</code> method into the header file, there is no error.  What am I missing?</p>