From 7859656ec2661bc4e38a727c7cc72c2d25fb1dc1 Mon Sep 17 00:00:00 2001 From: Ferdinand Bachmann Date: Mon, 12 May 2025 16:02:10 +0200 Subject: [PATCH] ring-buffer: fix move constructor from container not actually moving --- include/ring-buffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ring-buffer.h b/include/ring-buffer.h index 5d8f40b..e0a2a85 100644 --- a/include/ring-buffer.h +++ b/include/ring-buffer.h @@ -30,7 +30,7 @@ public: basic_ring_buffer() = default; ~basic_ring_buffer() = default; CONSTEXPR basic_ring_buffer(const Container& other) COND_NOEXCEPT(noexcept(Container(other))) : container(other) {} - CONSTEXPR basic_ring_buffer(Container&& other) COND_NOEXCEPT(noexcept(Container(other))) : container(other) {} + CONSTEXPR basic_ring_buffer(Container&& other) COND_NOEXCEPT(noexcept(Container(std::move(other)))) : container(std::move(other)) {} basic_ring_buffer(const basic_ring_buffer& other) = default; basic_ring_buffer(basic_ring_buffer&& other) = default; basic_ring_buffer& operator=(const basic_ring_buffer& other) = default;