diff options
author | Max Kellermann <max@duempel.org> | 2014-03-18 12:09:17 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-03-18 12:09:17 +0100 |
commit | a68acf5c66634444986d2eb5bf96a532c83729d1 (patch) | |
tree | 371540bb3d10dbd8557901db5230332e34d77279 /src | |
parent | 707d379b97acea36528e5dca4d60e65686926e57 (diff) |
util/ConstBuffer: add FromVoid(), ToVoid() to "void" specialization
Provide the full API.
Diffstat (limited to 'src')
-rw-r--r-- | src/util/ConstBuffer.hxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/ConstBuffer.hxx b/src/util/ConstBuffer.hxx index 6754cb065..2670489b1 100644 --- a/src/util/ConstBuffer.hxx +++ b/src/util/ConstBuffer.hxx @@ -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; } |