util/AllocatedString: add operator==(nullptr)

This commit is contained in:
Max Kellermann 2016-04-13 12:23:04 +02:00
parent 225984822d
commit 8ba3378096
1 changed files with 8 additions and 0 deletions

View File

@ -103,6 +103,14 @@ public:
return *this;
}
constexpr bool operator==(std::nullptr_t other) const {
return value == other;
}
constexpr bool operator!=(std::nullptr_t other) const {
return value != other;
}
constexpr bool IsNull() const {
return value == nullptr;
}