aboutsummaryrefslogtreecommitdiff
path: root/lib/util.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-11-01 10:25:45 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-11-01 10:25:45 +0900
commitce1de2a78a947423b305289beefc5f904734b234 (patch)
treecfd24495da4d5caa880bc941e37135f2d2d99734 /lib/util.h
parentfd3d6812a6a9c89c7ea4872defc4dd8dec2b19ed (diff)
downloadlibquotient-ce1de2a78a947423b305289beefc5f904734b234.tar.gz
libquotient-ce1de2a78a947423b305289beefc5f904734b234.zip
Reinstate Omittable<>::omitted (deprecated)
To ease on back-compatibility.
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);