util/ConstBuffer: add FromVoid(), ToVoid() to "void" specialization

Provide the full API.
This commit is contained in:
Max Kellermann 2014-03-18 12:09:17 +01:00
parent 707d379b97
commit a68acf5c66

View File

@ -63,6 +63,14 @@ struct ConstBuffer<void> {
return ConstBuffer(nullptr, 0);
}
constexpr static ConstBuffer<void> FromVoid(ConstBuffer<void> other) {
return other;
}
constexpr ConstBuffer<void> ToVoid() const {
return *this;
}
constexpr bool IsNull() const {
return data == nullptr;
}