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: Ben Boeckel <mathstuf@gmail.com>
This commit is contained in:
parent
88957b4c9d
commit
9dfedbe619
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue