title: MSVS/MSVC Static Template Class Method Does Not Warn
body: <p>A while ago, this <a href="https://stackoverflow.com/questions/31305717/member-function-with-static-linkage">question</a> was asked, regarding the familiar </p>
  
  <pre><code>error: 'static' can only be specified inside the class definition
  </code></pre>
  
  <p>error. </p>
  
  <p>In my current use-case, I am moving from a very MSVC project, where almost all the code is compiled using MSVC, and cross compiling for Android. </p>
  
  <blockquote>
    <p>I noticed that there is no MSVC error, least of all, a warning, about static class methods having definitions inside (outside) the class. Am I missing something? Why is there not at least a warning? </p>
  </blockquote>
  
  <hr>
  
  <p><strong>EDIT</strong></p>
  
  <p>To clarify, I am asking why there is no proper MSVC/MSVS warning for code such as this (taken from the link, above): </p>
  
  <pre><code>class Foobar {
  public:
    static void do_something();
  };
  static void Foobar::do_something() {} // Error!
  
  int main() {
      Foobar::do_something();
  }
  </code></pre>
  
  <hr>
  
  <p><strong>EDIT</strong></p>
  
  <p>So sorry evey one! This sample doesn't work! My apologies. </p>
  
  <pre><code>class Foobar {
  public:
    template&lt;class Y&gt; 
    static int do_something();
  };
  
  template&lt;class Y&gt; 
  static int Foobar::do_something() {return 1;} // Error!
  
  int main() {
      return Foobar::do_something&lt;double&gt;();
  }
  </code></pre>
  
  <p>Here is the output from <a href="https://godbolt.org/z/YTTWB0" rel="nofollow noreferrer">MSVC 19.14</a> (success), and <a href="https://godbolt.org/z/uAJpzY" rel="nofollow noreferrer">GCC 4.12</a> (failure).</p>