summaryrefslogtreecommitdiff
path: root/src/utils/optional_bool.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/optional_bool.hpp')
-rw-r--r--src/utils/optional_bool.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/utils/optional_bool.hpp b/src/utils/optional_bool.hpp
index 824e76d..59bbbab 100644
--- a/src/utils/optional_bool.hpp
+++ b/src/utils/optional_bool.hpp
@@ -20,6 +20,16 @@ struct OptionalBool
this->is_set = false;
}
+ std::string to_string()
+ {
+ if (this->is_set == false)
+ return "unset";
+ else if (this->value)
+ return "true";
+ else
+ return "false";
+ }
+
bool is_set{false};
bool value{false};
};