title: gcc: wrong number of template arguments
body: <p>Why this code compiles succesfully in VS13 and fails to compile by gcc?</p>
  
  <pre><code>/////    file my_map.h /////
  
  namespace my 
  {
      // my custom map
      template&lt;typename K, typename V, typename order = less&lt;K&gt;, typename allocator = cached_alloc&lt;page_allocator&lt;pair&lt;K,V&gt; &gt; &gt; &gt;
      class map : public set_base&lt;pair&lt;K, V&gt;, K, select1st, order, ins_unique, allocator&gt;
      {
          ...
      };
  }
  
  /////    file test.h /////
  
  #include "my_map.h"
  
  template &lt;typename T&gt;    
  class Base
  {
  protected:
      typedef my::map&lt;T, double&gt; MyMap;
      MyMap m_map;                                // this is line NN
  
  public:
      void func(const T&amp; key)
      {
          typename MyMap::iterator it = m_map.find(key);
          if(it != m_map.end()) {
              // ....
          }
      }
  };
  
  class Inherited1 : public Base &lt;char&gt;
  { };
  class Inherited2 : public Base &lt;int&gt;
  { };
  </code></pre>
  
  <p>It results in following errors (gcc 4.1.2)</p>
  
  <pre><code>filepath.h:LineNN error: wrong number of template arguments (1, should be 4)
  ..: error: provided for 'template&lt;class K, class V, class order, class allocator&gt; class my::map'
  </code></pre>
  
  <p>It is not clear for me what compiler actually means by "wrong number of template arguments "?</p>