Category : c++17

Presume I have a C++ header utils.h And I want to have some constant map available in multiple TUs(map is not inside a class, normal global variable/constant). const std::map<int, std::string> ToString{{1,"1"}, {2, "2"}}; Should I declare it inline or static? In other words: static const std::map<int, std::string> ToString{{1,"1"}, {2, "2"}}; or inline const std::map<int, std::string> ..

Read more