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