diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-11-01 10:25:45 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-11-01 10:25:45 +0900 |
commit | ce1de2a78a947423b305289beefc5f904734b234 (patch) | |
tree | cfd24495da4d5caa880bc941e37135f2d2d99734 /lib/util.h | |
parent | fd3d6812a6a9c89c7ea4872defc4dd8dec2b19ed (diff) | |
download | libquotient-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.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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); |