title: return value type auto deduction in static member function fails
body: <p>I have this code</p>
  
  <pre><code>struct Foo {
  
      static constexpr auto get() { return static_cast&lt;int&gt;(3); }
  
      Foo(int t = get()) {}
  };
  
  int main() {
      Foo t;
  }
  </code></pre>
  
  <p>That fails to compile with clang++ with the following error</p>
  
  <pre><code>test.cpp:7:17: error: function 'get' with deduced return type cannot be used before it is defined
      Foo(int t = get()) {}
                  ^
  test.cpp:5:27: note: 'get' declared here
      static constexpr auto get() { return static_cast&lt;int&gt;(3); }
                            ^
  1 error generated.
  </code></pre>
  
  <p>The error looks like <a href="https://stackoverflow.com/questions/43514665/use-of-auto-funcint-before-deduction-of-auto-in-c14/43514762">Use of &#39;auto func(int)&#39; before deduction of &#39;auto&#39; in C++14</a> but in my case, the function is defined before... Moving the function as is outside the class allows successful compilation (which is strange to me because I don't really see the difference).</p>
  
  <p>I tried with Gcc and it complains too.</p>
  
  <p>Why would the use of <code>auto</code> here be illformed?</p>