title: Member definition of partially specialized classes
body: <p>I'm trying to define member functions of partially specialized class templates, but different compilers have wildly different opinions of what I'm allowed to do and why.</p>
  <p>Let's take this slowly and start with something that works for all main compilers (all = gcc, clang and msvc):</p>
  <pre><code>#include &lt;concepts&gt;
  #include &lt;type_traits&gt;
  
  template &lt;class T&gt;
  concept Integer
  = std::is_same_v&lt;T,int&gt; || std::is_same_v&lt;T,unsigned int&gt;;
  
  template &lt;class T&gt;
  concept FloatingPoint
  = std::is_same_v&lt;T,float&gt; || std::is_same_v&lt;T,double&gt;;
  
  
  template &lt;class T&gt;
  struct Foo
  {
      T get() {return 0;}
  };
  
  template &lt;Integer T&gt;
  struct Foo&lt;T&gt;
  {
      T get(){ return 0; }
  };
  
  template &lt;FloatingPoint T&gt;
  struct Foo&lt;T&gt;
  {
      T get(){ return 0; }
  };
  
  int main()
  {
      Foo&lt;char&gt;().get();
      Foo&lt;int&gt;().get();
      Foo&lt;float&gt;().get();
  }
  </code></pre>
  <p>Examples on godbolt: <a href="https://godbolt.org/z/8xP3q7" rel="noreferrer">gcc</a>, <a href="https://godbolt.org/z/nP4oPG" rel="noreferrer">clang</a>, <a href="https://godbolt.org/z/j9K54W" rel="noreferrer">msvc</a></p>
  <p>Cool, but I want to separate declarations and definitons of the member functions. Let's move the definiton <em>one of the specialized classes</em>.
  Examples: <a href="https://godbolt.org/z/5qqbK7" rel="noreferrer">gcc</a>, <a href="https://godbolt.org/z/qTzjWs" rel="noreferrer">clang</a>, <a href="https://godbolt.org/z/69G71j" rel="noreferrer">msvc</a>. GCC and MSVC both work fine, but Clang fails to correctly match the member definition to the correct declaration.</p>
  <p>No worries, I was never planning to use Clang anyway. Let's try separating the other specialized definition from its declaration too. Example: <a href="https://godbolt.org/z/cz6z6d" rel="noreferrer">gcc</a>, <a href="https://godbolt.org/z/8fqGd8" rel="noreferrer">clang</a>, <a href="https://godbolt.org/z/dTb7nb" rel="noreferrer">msvc</a>. GCC continues to deliver, Clang gives more of the same errors, and MSVC complains that I've redefined a member...</p>
  <p>Who is right? Do I have a fundamental misconception about partial template specialization? How do I get this working on MSVC?</p>