util/{Const,Writable}Buffer: add operator==(nullptr_t)
This commit is contained in:
@@ -76,6 +76,14 @@ struct ConstBuffer<void> {
|
||||
return data == nullptr;
|
||||
}
|
||||
|
||||
constexpr bool operator==(std::nullptr_t) const {
|
||||
return data == nullptr;
|
||||
}
|
||||
|
||||
constexpr bool operator!=(std::nullptr_t) const {
|
||||
return data != nullptr;
|
||||
}
|
||||
|
||||
constexpr bool IsEmpty() const {
|
||||
return size == 0;
|
||||
}
|
||||
@@ -143,6 +151,14 @@ struct ConstBuffer {
|
||||
return data == nullptr;
|
||||
}
|
||||
|
||||
constexpr bool operator==(std::nullptr_t) const {
|
||||
return data == nullptr;
|
||||
}
|
||||
|
||||
constexpr bool operator!=(std::nullptr_t) const {
|
||||
return data != nullptr;
|
||||
}
|
||||
|
||||
constexpr bool IsEmpty() const {
|
||||
return size == 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user