From 3c574fca99a5c2882780031f4b4d887e8bfae218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Wed, 23 Feb 2022 17:51:46 +0300 Subject: [PATCH] mdbx++: fix move-assignment operators for "managed" classes. The three same mistakes for `mdbx::env_managed`, `mdbx::txn_managed` and `mdbx::cursor_managed`. A `derived_managed &operator=(derived_managed &&) = default;` don't call an inherited `base::operator=()` since it hidded because the `derived_managed(derived_managed &&) = default;` is also provided. Replaces/overrides https://github.com/erthink/libmdbx/pull/270. --- mdbx.h++ | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mdbx.h++ b/mdbx.h++ index 7c9e3867..eef2e409 100644 --- a/mdbx.h++ +++ b/mdbx.h++ @@ -3453,7 +3453,7 @@ public: void close(bool dont_sync = false); env_managed(env_managed &&) = default; - env_managed &operator=(env_managed &&) = default; + using inherited::operator=; env_managed(const env_managed &) = delete; env_managed &operator=(const env_managed &) = delete; virtual ~env_managed() noexcept; @@ -3744,7 +3744,7 @@ class LIBMDBX_API_TYPE txn_managed : public txn { public: MDBX_CXX11_CONSTEXPR txn_managed() noexcept = default; txn_managed(txn_managed &&) = default; - txn_managed &operator=(txn_managed &&) = default; + using inherited::operator=; txn_managed(const txn_managed &) = delete; txn_managed &operator=(const txn_managed &) = delete; ~txn_managed() noexcept; @@ -3939,7 +3939,7 @@ public: void close(); cursor_managed(cursor_managed &&) = default; - cursor_managed &operator=(cursor_managed &&) = default; + using inherited::operator=; cursor_managed(const cursor_managed &) = delete; cursor_managed &operator=(const cursor_managed &) = delete; ~cursor_managed() noexcept { ::mdbx_cursor_close(handle_); }