mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-30 02:24:14 +08:00
mdbx++: refine descriptions for compare_fast()
and compare_lexicographically()
.
This commit is contained in:
parent
51f8407a08
commit
8ef3bfcc95
19
mdbx.h++
19
mdbx.h++
@ -965,20 +965,21 @@ struct LIBMDBX_API_TYPE slice : public ::MDBX_val {
|
||||
hash_value() const noexcept;
|
||||
|
||||
/// \brief Three-way fast non-lexicographically length-based comparison.
|
||||
/// \return value:
|
||||
/// == 0 if "a" == "b",
|
||||
/// < 0 if "a" shorter than "b",
|
||||
/// > 0 if "a" longer than "b",
|
||||
/// < 0 if "a" length-equal and lexicographically less than "b",
|
||||
/// > 0 if "a" length-equal and lexicographically great than "b".
|
||||
/// \details Firstly compares length and if it equal then compare content
|
||||
/// lexicographically. \return value:
|
||||
/// `== 0` if `a` the same as `b`;
|
||||
/// `< 0` if `a` shorter than `b`,
|
||||
/// or the same length and lexicographically less than `b`;
|
||||
/// `> 0` if `a` longer than `b`,
|
||||
/// or the same length and lexicographically great than `b`.
|
||||
MDBX_NOTHROW_PURE_FUNCTION static MDBX_CXX14_CONSTEXPR intptr_t
|
||||
compare_fast(const slice &a, const slice &b) noexcept;
|
||||
|
||||
/// \brief Three-way lexicographically comparison.
|
||||
/// \return value:
|
||||
/// < 0 if "a" < "b",
|
||||
/// == 0 if "a" == "b",
|
||||
/// > 0 if "a" > "b".
|
||||
/// `== 0` if `a` lexicographically equal `b`;
|
||||
/// `< 0` if `a` lexicographically less than `b`;
|
||||
/// `> 0` if `a` lexicographically great than `b`.
|
||||
MDBX_NOTHROW_PURE_FUNCTION static MDBX_CXX14_CONSTEXPR intptr_t
|
||||
compare_lexicographically(const slice &a, const slice &b) noexcept;
|
||||
friend MDBX_CXX14_CONSTEXPR bool operator==(const slice &a,
|
||||
|
Loading…
x
Reference in New Issue
Block a user