title: use std::thread::id in map to have thread safe
body: <p>The idea is to have instance for each thread, so I created new instance for every new <code>thread::id</code> like that :</p>
  
  <pre><code>struct doSomething{
      void test(int toto) {}
  };
  
  void test(int toto)
  {
      static std::map&lt;std::thread::id, doSomething *&gt; maps;
  
      std::map&lt;std::thread::id, doSomething *&gt;::iterator it = maps.find(std::this_thread::get_id());
      if (it == maps.end())
      {
          // mutex.lock() ?
          maps[std::this_thread::get_id()] = new doSomething();
          it = maps.find(std::this_thread::get_id());
          // mutex.unlock() ?
      }
      it-&gt;second-&gt;test(toto);
  }
  </code></pre>
  
  <p>Is it a good idea?</p>