mirror of
https://github.com/isar/libmdbx.git
synced 2025-08-19 19:39:26 +08:00
mdbx++: Done rest of NOT_IMPLEMENTED.
Change-Id: I4707416ce4a7b41a04824749be34e338d73f9ea0
This commit is contained in:
5
mdbx.h++
5
mdbx.h++
@@ -613,6 +613,9 @@ struct LIBMDBX_API_TYPE slice : public ::MDBX_val {
|
||||
friend inline bool operator>=(const slice &a, const slice &b) noexcept;
|
||||
friend inline bool operator!=(const slice &a, const slice &b) noexcept;
|
||||
|
||||
constexpr bool is_valid() const noexcept {
|
||||
return !(iov_base == nullptr && iov_len != 0);
|
||||
}
|
||||
constexpr static slice invalid() noexcept { return slice(size_t(-1)); }
|
||||
|
||||
protected:
|
||||
@@ -694,6 +697,8 @@ public:
|
||||
|
||||
constexpr const void *data() const noexcept { return slice_.data(); }
|
||||
|
||||
constexpr void *data() noexcept { return const_cast<void *>(slice_.data()); }
|
||||
|
||||
__nothrow_pure_function cxx20_constexpr size_t length() const noexcept {
|
||||
return CONSTEXPR_ASSERT(is_reference() ||
|
||||
slice_.length() + headroom() == silo_.length()),
|
||||
|
Reference in New Issue
Block a user