mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-30 01:54:13 +08:00
mdbx++: дополнительные операторы преобразования к типам C API (backport).
This commit is contained in:
parent
b6034e8045
commit
fb15c8ca0b
3
mdbx.h++
3
mdbx.h++
@ -736,6 +736,8 @@ struct LIBMDBX_API_TYPE slice : public ::MDBX_val {
|
|||||||
slice &operator=(const slice &) noexcept = default;
|
slice &operator=(const slice &) noexcept = default;
|
||||||
inline slice &operator=(slice &&src) noexcept;
|
inline slice &operator=(slice &&src) noexcept;
|
||||||
inline slice &operator=(::MDBX_val &&src);
|
inline slice &operator=(::MDBX_val &&src);
|
||||||
|
operator MDBX_val *() noexcept { return this; }
|
||||||
|
operator const MDBX_val *() const noexcept { return this; }
|
||||||
|
|
||||||
#if defined(DOXYGEN) || \
|
#if defined(DOXYGEN) || \
|
||||||
(defined(__cpp_lib_string_view) && __cpp_lib_string_view >= 201606L)
|
(defined(__cpp_lib_string_view) && __cpp_lib_string_view >= 201606L)
|
||||||
@ -3106,6 +3108,7 @@ struct LIBMDBX_API_TYPE map_handle {
|
|||||||
map_handle(const map_handle &) noexcept = default;
|
map_handle(const map_handle &) noexcept = default;
|
||||||
map_handle &operator=(const map_handle &) noexcept = default;
|
map_handle &operator=(const map_handle &) noexcept = default;
|
||||||
operator bool() const noexcept { return dbi != 0; }
|
operator bool() const noexcept { return dbi != 0; }
|
||||||
|
operator MDBX_dbi() const { return dbi; }
|
||||||
|
|
||||||
using flags = ::MDBX_db_flags_t;
|
using flags = ::MDBX_db_flags_t;
|
||||||
using state = ::MDBX_dbi_state_t;
|
using state = ::MDBX_dbi_state_t;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user