diff --git a/iceoryx_hoofs/include/iceoryx_hoofs/internal/relocatable_pointer/relative_pointer.inl b/iceoryx_hoofs/include/iceoryx_hoofs/internal/relocatable_pointer/relative_pointer.inl index f03bff36c88..b1fc43372cb 100644 --- a/iceoryx_hoofs/include/iceoryx_hoofs/internal/relocatable_pointer/relative_pointer.inl +++ b/iceoryx_hoofs/include/iceoryx_hoofs/internal/relocatable_pointer/relative_pointer.inl @@ -62,8 +62,11 @@ inline RelativePointer& RelativePointer::operator=(const RelativePointer& template RelativePointer::RelativePointer(RelativePointer&& other) noexcept + : m_id(std::move(other.m_id)) + , m_offset(std::move(other.m_offset)) { - *this = std::move(other); + other.m_id = NULL_POINTER_ID; + other.m_offset = NULL_POINTER_OFFSET; } template