diff options
| author | Stefan Boberg <[email protected]> | 2021-05-21 16:20:01 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-05-21 16:20:01 +0200 |
| commit | cd04db3c2f2c0536b554316b73fe688584900bb7 (patch) | |
| tree | d29af333c2c1950154ea7a165afcd60f5d8d398b /zencore/include | |
| parent | WIP structured cache endpoints - tactical check-in not fully functional yet (diff) | |
| download | zen-cd04db3c2f2c0536b554316b73fe688584900bb7.tar.xz zen-cd04db3c2f2c0536b554316b73fe688584900bb7.zip | |
Added Oid::operator bool for "null" checking
Diffstat (limited to 'zencore/include')
| -rw-r--r-- | zencore/include/zencore/uid.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/zencore/include/zencore/uid.h b/zencore/include/zencore/uid.h index a793b160a..7fc42293f 100644 --- a/zencore/include/zencore/uid.h +++ b/zencore/include/zencore/uid.h @@ -55,7 +55,8 @@ struct Oid [[nodiscard]] static Oid FromHexString(const std::string_view String); StringBuilderBase& ToString(StringBuilderBase& OutString) const; - auto operator<=>(const Oid& rhs) const = default; + auto operator<=>(const Oid& rhs) const = default; + [[nodiscard]] inline operator bool() const { return *this == Zero; } static const Oid Zero; // Min (can be used to signify a "null" value, or for open range queries) static const Oid Max; // Max (can be used for open range queries) |