Commit ad2b8589 authored by Max Kellermann's avatar Max Kellermann Committed by Max Kellermann

util/ForeignFifoBuffer: add friend function swap()

parent d7aa4fa7
...@@ -90,6 +90,10 @@ public: ...@@ -90,6 +90,10 @@ public:
swap(data, other.data); swap(data, other.data);
} }
friend void swap(ForeignFifoBuffer<T> &a, ForeignFifoBuffer<T> &b) noexcept {
a.swap(b);
}
constexpr bool IsNull() const noexcept { constexpr bool IsNull() const noexcept {
return data == nullptr; return data == nullptr;
} }
......
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