title: Two obscure MSVC++ 2017 (15.9.28307.905) compiler issues
body: <p>The first issue:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  class Tester
  {
  public:
      template&lt; typename T &gt;
      static T f1();
  
      template&lt; typename T &gt;
      static void f2( const T&amp; p = Tester::f1&lt; T &gt;() );
  };
  
  template&lt;&gt;
  float Tester::f1()
  {
      return 0.0f;
  }
  
  template&lt; typename T &gt;
  void Tester::f2( const T&amp; p )
  {
      std::cout &lt;&lt; p;
  }
  
  int main( int argc, char* argv[] )
  {
      Tester::f2&lt; float &gt;();
  
      return EXIT_SUCCESS;
  }
  </code></pre>
  
  <p>Compilation output using the aforementioned compiler:</p>
  
  <pre><code>main.obj:-1: error: LNK2019: unresolved external symbol "public: static class $RBAAB __cdecl Tester::f1&lt;`template-type-parameter-1'&gt;(void)" (??$f1@$RBAAB@@Tester@@SA?AV$RBAAB@@XZ) referenced in function main
  debug\test.exe:-1: error: LNK1120: 1 unresolved externals
  </code></pre>
  
  <p>MSVC++ 2015 (14.0) reports no errors compiling this code. The error is produced only if <code>f1</code> is part of a class. <code>f2</code> could be anywhere - a standalone function or a class member one.</p>
  
  <p>If you define <code>f1</code> rather than specializing it, that is replace return type <code>float</code>:</p>
  
  <pre><code>template&lt;&gt;
  float Tester::f1()
  {
      return 0.0f;
  }
  </code></pre>
  
  <p>with <code>T</code>:</p>
  
  <pre><code>template&lt; typename T &gt;
  T Tester::f1()
  {
      return 0.0f;
  }
  </code></pre>
  
  <p>you'll get the following error:</p>
  
  <p><code>error: C1001: An internal error has occurred in the compiler.</code></p>
  
  <p>Again MSVC++ 2015 doesn't produce any errors.</p>
  
  <p>Any ideas, why MSVC++ 2017 is more problematic?</p>