From 4a9095aee75f9feb8ef71f3bc58af52bc35282dc Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Sat, 18 Apr 2020 14:28:27 +0200 Subject: [PATCH] Fixed pointer to ref conversion --- include/ring-buffer-iterator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ring-buffer-iterator.h b/include/ring-buffer-iterator.h index 094a7cf..8b6e800 100644 --- a/include/ring-buffer-iterator.h +++ b/include/ring-buffer-iterator.h @@ -131,10 +131,10 @@ public: } CONSTEXPR ring_buffer_const_iterator operator+(difference_type n) const NOEXCEPT { - return {container_ptr, front, index + n}; + return {*container_ptr, front, index + n}; } CONSTEXPR ring_buffer_const_iterator operator-(difference_type n) const NOEXCEPT { - return {container_ptr, front, index - n}; + return {*container_ptr, front, index - n}; } CONSTEXPR reference operator*() const COND_NOEXCEPT(noexcept(container_ptr->cbegin()) &&noexcept(container_ptr->size())) {