title: Initialize static std::multimap inside method where it is declared
body: <p>I need to have static multimap, but I don't want do it as class field, 'cos I need it only in one method. I write it so, but isn't it any other way to initialize this map inside function that initialization code will run only with first call to the function?</p>
  
  <pre><code>static void someClass::someMethod(/**/)
  {
      static multimap&lt;int, char&gt; err;
  
      if(err.size() == 0)
      {//initialize here
          err.insert(std::pair&lt;int, char&gt;(1, 'a'));
          err.insert(std::pair&lt;int, char&gt;(2, 'b'));
          err.insert(std::pair&lt;int, char&gt;(3, 'v'));
          err.insert(std::pair&lt;int, char&gt;(4, 'c'));
      }
      //method logic
  }
  </code></pre>