title: Variadic templated type as return type, MSVC weirdness
body: <p>Given the following code:</p>
  <pre><code>class DummyOK {
     public:
      template &lt;typename U, typename... Args&gt;
      class AThing {
         public:
      };
  
     public:
      template &lt;typename U, typename... Args&gt;
      AThing&lt;U, Args...&gt; GetAThing();
  };
  
  template &lt;typename U, typename... Args&gt;
  typename DummyOK::template AThing&lt;U, Args...&gt; DummyOK::GetAThing() {
      return AThing&lt;U, Args...&gt;{};
  }
  
  template &lt;typename T&gt;
  class DummyKO {
     public:
      template &lt;typename U, typename... Args&gt;
      class AThing {
         public:
      };
  
     public:
      template &lt;typename U, typename... Args&gt;
      AThing&lt;U, Args...&gt; GetAThing();
  
      template &lt;typename U, typename... Args&gt;
      AThing&lt;U, Args...&gt; AnOtherGetAThing() {
          return AThing&lt;U, Args...&gt;{};
      }
  };
  
  template &lt;typename T&gt;
  template &lt;typename U, typename... Args&gt;
  typename DummyKO&lt;T&gt;::template AThing&lt;U, Args...&gt; DummyKO&lt;T&gt;::GetAThing() {
      return AThing&lt;U, Args...&gt;{};
  }
  
  int main() {
      DummyOK{}.GetAThing&lt;char, unsigned, float&gt;();
      DummyKO&lt;int&gt;{}.GetAThing&lt;char, unsigned, float&gt;();
      DummyKO&lt;int&gt;{}.AnOtherGetAThing&lt;char, unsigned, float&gt;();
  
      return 0;
  }
  </code></pre>
  <p>Also available here: <a href="https://godbolt.org/z/8747rj77K" rel="nofollow noreferrer">https://godbolt.org/z/8747rj77K</a></p>
  <p>Why does it compiles on clang/gcc but not msvc.
  Why does AnOtherGetAThing() compiles but not GetAThing() (on msvc).</p>
  <p>The error returned by msvc is:</p>
  <pre><code>&lt;source&gt;(39): error C2244: 'DummyKO&lt;T&gt;::GetAThing': unable to match function definition to an existing declaration
  &lt;source&gt;(39): note: see declaration of 'DummyKO&lt;T&gt;::GetAThing'
  &lt;source&gt;(39): note: definition
  &lt;source&gt;(39): note: 'DummyKO&lt;T&gt;::AThing&lt;U,Args...&gt; DummyKO&lt;T&gt;::GetAThing(void)'
  &lt;source&gt;(39): note: existing declarations
  &lt;source&gt;(39): note: 'DummyKO&lt;T&gt;::AThing&lt;U,Args...&gt; DummyKO&lt;T&gt;::GetAThing(void)'
  </code></pre>
  <p>Thanks</p>