mdbx++: Done rest of NOT_IMPLEMENTED.

Change-Id: I4707416ce4a7b41a04824749be34e338d73f9ea0
This commit is contained in:
Leonid Yuriev
2020-09-01 13:07:05 +03:00
parent baeca4109a
commit cd9ac17d59
2 changed files with 38 additions and 13 deletions

View File

@@ -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()),