From 1550113506ee41e905f5f89659f404f1e3d7f1c8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 16 Aug 2019 13:21:28 +0200 Subject: [PATCH] util/DynamicFifoBuffer: add nullptr constructor overload --- src/util/DynamicFifoBuffer.hxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/util/DynamicFifoBuffer.hxx b/src/util/DynamicFifoBuffer.hxx index deba848a7..422b35eec 100644 --- a/src/util/DynamicFifoBuffer.hxx +++ b/src/util/DynamicFifoBuffer.hxx @@ -45,6 +45,12 @@ public: using typename ForeignFifoBuffer::const_pointer_type; using typename ForeignFifoBuffer::Range; + /** + * Construct without allocating a buffer. + */ + explicit constexpr DynamicFifoBuffer(std::nullptr_t n) noexcept + :ForeignFifoBuffer(n) {} + /** * Allocate a buffer with the given capacity. */