diff --git a/include/seastar/core/circular_buffer_fixed_capacity.hh b/include/seastar/core/circular_buffer_fixed_capacity.hh index 8ae8cf22de0..c29d609ec3d 100644 --- a/include/seastar/core/circular_buffer_fixed_capacity.hh +++ b/include/seastar/core/circular_buffer_fixed_capacity.hh @@ -33,6 +33,7 @@ #include #include #include +#include #include #endif @@ -224,11 +225,7 @@ template inline circular_buffer_fixed_capacity::circular_buffer_fixed_capacity(circular_buffer_fixed_capacity&& x) noexcept : _begin(x._begin), _end(x._end) { - // This is std::uninitialized_move, but that is c++17 only - auto dest = begin(); - for (auto& obj : x) { - new (&*dest++) T(std::move(obj)); - } + std::uninitialized_move(x.begin(), x.end(), begin()); } template