const variables in header file and static initialization fiasco
问题 After reading a lot of the questions regarding initialization of static variables I am still not sure how this applies to const variables at namespace level. I have kind of the following code in a header file config.h generated by the build script: static const std::string path1 = "/xyz/abc"; static const std::string path2 = "/etc"; According to what I have read the static keyword is not necessary, even deprecated here. My Question: Is the code above prone to the static initialization fiasco?