Commit 9dfedbe6 authored by Ben Boeckel's avatar Ben Boeckel Committed by Max Kellermann

ReusableArray: fix build error on GCC7

GCC7 outputs the following error without this change: src/util/ReusableArray.hxx:61:35: error: no matching function for call to ‘swap(size_t&, const size_t&)’ std::swap(capacity, src.capacity); which can be resolved by just using an rvalue-reference rather than a const rvalue-reference. Signed-off-by: 's avatarBen Boeckel <mathstuf@gmail.com>
parent 88957b4c
......@@ -56,7 +56,7 @@ public:
:buffer(std::exchange(src.buffer, nullptr)),
capacity(std::exchange(src.capacity, 0)) {}
ReusableArray &operator=(const ReusableArray &&src) {
ReusableArray &operator=(ReusableArray &&src) {
std::swap(buffer, src.buffer);
std::swap(capacity, src.capacity);
return *this;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment