Added specialization for get<bool>
This commit is contained in:
parent
3af9953206
commit
4864ff8529
@ -22,6 +22,11 @@ namespace sc {
|
||||
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:
|
||||
bool _has_dir {false};
|
||||
std::string _prog_name;
|
||||
|
Loading…
x
Reference in New Issue
Block a user