From ad2b8589338fef29a56b64de3414e645d210a020 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 16 Aug 2019 09:57:55 +0200 Subject: [PATCH] util/ForeignFifoBuffer: add friend function swap() --- src/util/ForeignFifoBuffer.hxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util/ForeignFifoBuffer.hxx b/src/util/ForeignFifoBuffer.hxx index 75fbad82e..bea0c1e5f 100644 --- a/src/util/ForeignFifoBuffer.hxx +++ b/src/util/ForeignFifoBuffer.hxx @@ -90,6 +90,10 @@ public: swap(data, other.data); } + friend void swap(ForeignFifoBuffer &a, ForeignFifoBuffer &b) noexcept { + a.swap(b); + } + constexpr bool IsNull() const noexcept { return data == nullptr; }