title: Initialize static std::map member inside templated class?
body: <p>Here is a code snippet from my project:</p>
  
  <pre><code>template&lt;typename Second, typename First = const UINT64&gt;
  class Event : virtual public id_manager&lt;&gt;
  {
      friend class EventHandler;
      typedef std::map&lt;First, EventHandler&gt; eventMap;
      static eventMap mapper;
      static eventMap StartMapping()
      {
          eventMap temp;
          return temp;
      }
  public:
      Event(){}
      void operator+=(EventHandler _handler)
      {
          mapper[this-&gt;getID()] = _handler;
      }
  };
  // INITIALIZATION FAILED HERE:
  template&lt;typename Second, typename First = const UINT64&gt;
  Event&lt;Second, First&gt;::eventMap Event&lt;Second, First&gt;::mapper(Event&lt;Second, First&gt;::StartMapping());
  </code></pre>
  
  <p>Here is output error from Visual studio 2010:</p>
  
  <blockquote>
    <p>Warning   1   warning C4346: 'Event::eventMap' : dependent
    name is not a type    c:\users\admin\documents\visual studio
    2010\projects\cppsystem\cppsystem\main.cpp    67 Error    2   error C2143:
    syntax error : missing ';' before
    'Event::mapper' c:\users\admin\documents\visual studio
    2010\projects\cppsystem\cppsystem\main.cpp    67 Error    3   error C4430:
    missing type specifier - int assumed. Note: C++ does not support
    default-int   c:\users\admin\documents\visual studio
    2010\projects\cppsystem\cppsystem\main.cpp    67 Error    4   error C1903:
    unable to recover from previous error(s); stopping
    compilation   c:\users\admin\documents\visual studio
    2010\projects\cppsystem\cppsystem\main.cpp    67</p>
  </blockquote>
  
  <p>I hope this pice of code is enough.
  I can't initialize static map member using "initialization functin" for that map.
  thanks alot!</p>