mirror of
https://github.com/isar/libmdbx.git
synced 2025-11-21 03:48:55 +08:00
mdbx++: add missing std::hash<mdbx::buffer<>>.
This commit is contained in:
6
mdbx.h++
6
mdbx.h++
@@ -6415,6 +6415,12 @@ template <> struct hash<::mdbx::slice> {
|
||||
MDBX_CXX14_CONSTEXPR size_t operator()(::mdbx::slice const &slice) const noexcept { return slice.hash_value(); }
|
||||
};
|
||||
|
||||
template <class ALLOCATOR, typename CAPACITY_POLICY> struct hash<::mdbx::buffer<ALLOCATOR, CAPACITY_POLICY>> {
|
||||
MDBX_CXX14_CONSTEXPR size_t operator()(::mdbx::buffer<ALLOCATOR, CAPACITY_POLICY> const &buffer) const noexcept {
|
||||
return buffer.hash_value();
|
||||
}
|
||||
};
|
||||
|
||||
/// end cxx_api @}
|
||||
} // namespace std
|
||||
|
||||
|
||||
Reference in New Issue
Block a user