title: no matching member function for call to 'erase'
body: <p>Here's the code that causes the error: </p>
  
  <p>Factory.h:</p>
  
  <pre><code>#include &lt;string&gt;
  #include &lt;map&gt;
  
  namespace BaseSubsystems
  {
      template &lt;class T&gt;
      class CFactory
      {
      protected:
          typedef T (*FunctionPointer)();
          typedef std::pair&lt;std::string,FunctionPointer&gt; TStringFunctionPointerPair;
          typedef std::map&lt;std::string,FunctionPointer&gt; TFunctionPointerMap;
          TFunctionPointerMap _table;
      public:
          CFactory () {}
          virtual ~CFactory();
      }; // class CFactory
  
      template &lt;class T&gt; 
      inline CFactory&lt;T&gt;::~CFactory()
      {
          TFunctionPointerMap::const_iterator it = _table.begin();
          TFunctionPointerMap::const_iterator it2;
  
          while( it != _table.end() )
          {
              it2 = it;
              it++;
              _table.erase(it2);
          }
  
      } // ~CFactory
  }
  </code></pre>
  
  <p>And the error I get:</p>
  
  <pre><code>error: no matching member function for call to 'erase' [3]
                           _table.erase(it2);
                           ~~~~~~~^~~~~
  </code></pre>
  
  <p>Any tips?
  Thanks. </p>