title: C++ Type alias error: expected unqualified-id before 'using'
body: <p>There are numerous resources explaining how to do Type aliasing, but clearly I am missing something. I am trying to create a map alias. When debugging I want my <code>Map_t</code> to be the standard library <code>map</code> since it is easier to see what it contains, and when not debugging I want it to be <code>btree::btree_map</code> since it uses less memory.</p>
  
  <p>To do this I tried the following:</p>
  
  <pre><code>#if DEBUG
  #include &lt;map&gt;
  template&lt;typename U, typename V&gt;
  using Map_t = map&lt;typename U, typename V&gt;;  // &lt;--- Error on this line
  #else
  #include "btree_map.h"
  template&lt;typename U, typename V&gt;
  using Map_t = btree::btree_map&lt;typename U,typename V&gt;;  // &lt;--- Error on this line
  #endif
  </code></pre>
  
  <p>When compiling I get the error <code>error: expected unqualified-id before 'using'</code>. I've tried several variations of the above with no success. Thanks in advance for your comments.</p>
  
  <p>UPDATE:
  I feel I may have made this a little confusing be including the btree portion. SO let me expand a little. If I declare my types as say either</p>
  
  <pre><code>btree::btree_map&lt;int, int&gt; mymap;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>map&lt;int, int&gt; mymap;
  </code></pre>
  
  <p>all is fine. But just trying to introduce</p>
  
  <pre><code>template&lt;typename U, typename V&gt;
  using Map_t = map&lt;U, V&gt;;
  
  Map_t&lt;int, int&gt; mymap;
  </code></pre>
  
  <p>leads the the error.</p>