util/AllocatedArray: add nullptr constructor

This commit is contained in:
Max Kellermann 2020-11-19 19:05:17 +01:00 committed by Max Kellermann
parent b1bef9c21d
commit 9420c74101

View File

@ -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) {}