mdbx++: add operator<<(ostream, pair_result).

Change-Id: I44cc28f7f4f7d65225239d62f5bb8a15a8de16a8
This commit is contained in:
Leonid Yuriev 2020-10-31 18:22:48 +03:00
parent e3f32ec6b4
commit 586e25c48c
2 changed files with 6 additions and 0 deletions

View File

@ -2679,6 +2679,7 @@ public:
LIBMDBX_API ::std::ostream &operator<<(::std::ostream &, const slice &);
LIBMDBX_API ::std::ostream &operator<<(::std::ostream &, const pair &);
LIBMDBX_API ::std::ostream &operator<<(::std::ostream &, const pair_result &);
template <class ALLOCATOR>
inline ::std::ostream &operator<<(::std::ostream &out,
const buffer<ALLOCATOR> &it) {

View File

@ -1297,6 +1297,11 @@ __cold ::std::ostream &operator<<(::std::ostream &out, const pair &it) {
return out << "{" << it.key << " => " << it.value << "}";
}
__cold ::std::ostream &operator<<(::std::ostream &out, const pair_result &it) {
return out << "{" << (it.done ? "done: " : "non-done: ") << it.key << " => "
<< it.value << "}";
}
__cold ::std::ostream &operator<<(::std::ostream &out,
const ::mdbx::env::geometry::size &it) {
switch (it.bytes) {