aboutsummaryrefslogtreecommitdiff
path: root/lib/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util.h')
-rw-r--r--lib/util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/util.h b/lib/util.h
index 15c9fec8..5be62382 100644
--- a/lib/util.h
+++ b/lib/util.h
@@ -83,6 +83,12 @@ public:
return this->has_value() ? base_type::operator*() : this->emplace();
}
+ [[deprecated("Use '!o' or '!o.has_value()' instead of 'o.omitted()'")]]
+ bool omitted() const
+ {
+ return !this->has_value();
+ }
+
/// Merge the value from another Omittable
/// \return true if \p other is not omitted and the value of
/// the current Omittable was different (or omitted);