mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-30 11:29:19 +08:00
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.
This commit is contained in:
parent
6b45498985
commit
3c574fca99
6
mdbx.h++
6
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_); }
|
||||
|
Loading…
Reference in New Issue
Block a user