From 899bd9f92474a33774e3420af36e918660862cb5 Mon Sep 17 00:00:00 2001 From: lishuo Date: Mon, 22 Jan 2024 11:43:42 +0800 Subject: [PATCH] basic_acquired_pointer acquired_pointer member function operator= return *this --- include/cdrc/internal/memory_manager_base.h | 1 + include/cdrc/internal/smr/acquire_retire.h | 1 + 2 files changed, 2 insertions(+) diff --git a/include/cdrc/internal/memory_manager_base.h b/include/cdrc/internal/memory_manager_base.h index 387ea59..22d2f74 100644 --- a/include/cdrc/internal/memory_manager_base.h +++ b/include/cdrc/internal/memory_manager_base.h @@ -40,6 +40,7 @@ struct basic_acquired_pointer { basic_acquired_pointer &operator=(basic_acquired_pointer&& other) noexcept { value = other.value; other.value = nullptr; + return *this; } void swap(basic_acquired_pointer &other) { diff --git a/include/cdrc/internal/smr/acquire_retire.h b/include/cdrc/internal/smr/acquire_retire.h index 5d9a145..e92abc8 100644 --- a/include/cdrc/internal/smr/acquire_retire.h +++ b/include/cdrc/internal/smr/acquire_retire.h @@ -108,6 +108,7 @@ struct acquire_retire : public memory_manager_base