title: C++ templates error: instantiated from 'void TestClass::testMethod(T, std::map) [with T = SomeClass]
body: <p>I've some problem in my code I cannot deal with:</p>
  
  <pre><code>#ifndef TESTCLASS_H_
  #define TESTCLASS_H_
  
  #include &lt;map&gt;
  
  using namespace std;
  template &lt;typename T&gt;
  class TestClass
  {
  public:
    TestClass(){};
    virtual ~TestClass(){};
    void testMethod(T b,std::map&lt;T,int&gt; m);
  };
  
  template &lt;typename T&gt;
  void TestClass&lt;T&gt;::testMethod(T b,std::map&lt;T,int&gt; m){
    m[b]=0;
  }
  #endif /*TESTCLASS_H_*/
  
  int main(int argc, char* argv[]) {
    SomeClass s;
    TestClass&lt;SomeClass&gt; t;
    map&lt;SomeClass,int&gt; m;
    t.testMethod(s,m);
  }  
  </code></pre>
  
  <p>Compiler gives me following error in line m[b]=0; :</p>
  
  <p>instantiated from 'void TestClass::testMethod(T, std::map) [with T = SomeClass]</p>
  
  <p>Could you help find the problem??</p>
  
  <p>Thanks in advance</p>