title: using typedef for unique_ptr template
body: <p>The following code compiles.</p>
  
  <p>matrix.h before template</p>
  
  <pre><code>template&lt;typename T&gt;
  class Matrix
  {
  public:
      //...
      unique_ptr&lt;Matrix&lt;T&gt;&gt; Test() const;
  };
  </code></pre>
  
  <p>matrix.cpp before template</p>
  
  <pre><code>template&lt;typename T&gt;
  unique_ptr&lt;Matrix&lt;T&gt;&gt; Matrix&lt;T&gt;::Test() const
  {
      unique_ptr&lt;Matrix&lt;T&gt;&gt; a{ new Matrix&lt;T&gt;{ 1, 1 } };
      return std::move(a);
  }
  </code></pre>
  
  <p>I wanted to use a typedef (using) to shorten things as I thought it'd be more readable but my changes cause errors. Here are the relevant changes.</p>
  
  <p>matrix.h after template</p>
  
  <pre><code>template&lt;typename T&gt;
  class Matrix
  {
  public:
      //...
      MatrixUniq&lt;T&gt; Test() const;
  };
  
  template&lt;class T&gt; using MatrixUniq = unique_ptr&lt;Matrix&lt;T&gt;&gt;;
  </code></pre>
  
  <p>matrix.cpp after template</p>
  
  <pre><code>template&lt;typename T&gt;
  MatrixUniq&lt;T&gt; Matrix&lt;T&gt;::Test() const
  {
      MatrixUniq&lt;T&gt; a{ new Matrix&lt;T&gt;{ 1, 1 } };
      return std::move(a);
  }
  </code></pre>
  
  <p>Compiling after these changes are made crashes the VC++ compiler twice, but also generates a few errors:</p>
  
  <pre><code>Error   C2143   syntax error: missing ';' before '&lt;'    
  Error   C4430   missing type specifier - int assumed. 
  Error   C2238   unexpected token(s) preceding ';'
  Error   C1903   unable to recover from previous error(s);
  </code></pre>
  
  <p>What's wrong with my typedef implementation? Thanks.</p>
  
  <p>Edit:
  I'm using VS2015. I'm building a static library. At the bottom of matrix.cpp I have:</p>
  
  <pre><code>template class VMatrix&lt;double&gt;;
  </code></pre>