Added specialization for get<bool>

This commit is contained in:
Bob Polis 2021-07-05 18:57:36 +02:00
parent 3af9953206
commit 4864ff8529

View File

@ -22,6 +22,11 @@ namespace sc {
return sc::from_string<T>(it->second); return sc::from_string<T>(it->second);
} }
bool get(const std::string& key, bool default_value) {
std::string val {get<std::string>(key, default_value ? "yes" : "no")};
return val == "yes";
}
private: private:
bool _has_dir {false}; bool _has_dir {false};
std::string _prog_name; std::string _prog_name;