util/ForeignFifoBuffer: add friend function swap()

This commit is contained in:
Max Kellermann 2019-08-16 09:57:55 +02:00 committed by Max Kellermann
parent d7aa4fa7d3
commit ad2b858933

View File

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