 <p>declare a function and declare <code>config_map</code> as a static inside it</p> <pre><code>class MyClass { ... static std::map&lt;std::string,std::string&gt; &amp; config_map() { static std::map&lt;std::string,std::string&gt; map; return map; } }; void MyClass::SomeMethod() { ... config_map().insert(std::pair&lt;std::string,std::string&gt;("dssd","Sdd")); } std::string OtherClass::mystring = MyClass::config_map()["something"]; </code></pre> <p>now map is guarantee to be initialized.</p>