#undef CONFIG
}
+template <> bool ConfigManager::get<bool>(const std::string &key) const
+{
+ auto raw = _map.at(key);
+
+ static const std::array<std::string, 5> false_list{"0", "OFF", "FALSE", "N", "NO"};
+ auto false_found = std::find(false_list.begin(), false_list.end(), raw);
+
+ return (false_found == false_list.end());
+}
+
+template <> int ConfigManager::get<int>(const std::string &key) const
+{
+ auto raw = _map.at(key);
+ return std::stoi(raw);
+}
+
+template <> std::string ConfigManager::get<std::string>(const std::string &key) const
+{
+ auto raw = _map.at(key);
+ return raw;
+}
+
} // namespace config
} // namespace neurun
std::unordered_map<std::string, std::string> _map;
};
-template <> bool ConfigManager::get<bool>(const std::string &key) const
-{
- auto raw = _map.at(key);
-
- static const std::array<std::string, 5> false_list{"0", "OFF", "FALSE", "N", "NO"};
- auto false_found = std::find(false_list.begin(), false_list.end(), raw);
-
- return (false_found == false_list.end());
-}
-
-template <> int ConfigManager::get<int>(const std::string &key) const
-{
- auto raw = _map.at(key);
- return std::stoi(raw);
-}
-
-template <> std::string ConfigManager::get<std::string>(const std::string &key) const
-{
- auto raw = _map.at(key);
- return raw;
-}
+template <> bool ConfigManager::get<bool>(const std::string &key) const;
+template <> int ConfigManager::get<int>(const std::string &key) const;
+template <> std::string ConfigManager::get<std::string>(const std::string &key) const;
} // namespace config
} // namespace neurun