From 9420c74101c9e4e7bd8ca7b4e5e186ae81d29d20 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 19 Nov 2020 19:05:17 +0100 Subject: [PATCH] util/AllocatedArray: add nullptr constructor --- src/util/AllocatedArray.hxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/AllocatedArray.hxx b/src/util/AllocatedArray.hxx index e0491be89..c920d9f06 100644 --- a/src/util/AllocatedArray.hxx +++ b/src/util/AllocatedArray.hxx @@ -70,6 +70,9 @@ public: std::copy_n(src.data, src.size, buffer.data); } + AllocatedArray(std::nullptr_t n) noexcept + :buffer(n) {} + explicit AllocatedArray(const AllocatedArray &other) noexcept :AllocatedArray(other.buffer) {}