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 <maths...@gmail.com> --- src/util/ReusableArray.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/ReusableArray.hxx b/src/util/ReusableArray.hxx index f309e8322..cb40e610a 100644 --- a/src/util/ReusableArray.hxx +++ b/src/util/ReusableArray.hxx @@ -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; -- 2.11.1 _______________________________________________ mpd-devel mailing list mpd-devel@musicpd.org http://mailman.blarg.de/listinfo/mpd-devel