diff --git a/src/core/ring_buffer.hpp b/src/core/ring_buffer.hpp index 8593be1228..d29e319dc7 100644 --- a/src/core/ring_buffer.hpp +++ b/src/core/ring_buffer.hpp @@ -202,19 +202,6 @@ private: return (a.ring == b.ring) && (a.pos == b.pos); } -public: - friend bool operator==(const const_iterator &a, const iterator &b) noexcept - { - return ring_buffer::iter_equal(a, b); - } - - friend bool operator==(const const_reverse_iterator &a, const reverse_iterator &b) noexcept - { - return ring_buffer::iter_equal(a, b); - } - - ring_buffer() = default; - template void construct_from(const U &other) { @@ -230,6 +217,19 @@ public: } } +public: + friend bool operator==(const const_iterator &a, const iterator &b) noexcept + { + return ring_buffer::iter_equal(a, b); + } + + friend bool operator==(const const_reverse_iterator &a, const reverse_iterator &b) noexcept + { + return ring_buffer::iter_equal(a, b); + } + + ring_buffer() = default; + ring_buffer(const ring_buffer &other) { if (!other.empty()) {