mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-29 19:21:01 +00:00
Merge 'sstables: prepare bound_kind_m formatter for clang' from Avi Kivity
bound_kind_m's formatter violates argument dependent lookup rules according to clang, so fix that. Along the way improve the formatter a little. Closes #7412 * git://github.com/avikivity/scylla.git avikivity-bound_kind_m-formatter: sstables: move bound_kind_m formatter to namespace sstables sstables: move bound_kind_m formatter to its natural place sstables: deinline bound_kind_m formatter
This commit is contained in:
@@ -58,4 +58,36 @@ future<int64_t> read_signed_vint(random_access_reader& in) {
|
||||
return read_vint_impl<int64_t>(in);
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& out, sstables::bound_kind_m kind) {
|
||||
switch (kind) {
|
||||
case sstables::bound_kind_m::excl_end:
|
||||
out << "excl_end";
|
||||
break;
|
||||
case sstables::bound_kind_m::incl_start:
|
||||
out << "incl_start";
|
||||
break;
|
||||
case sstables::bound_kind_m::excl_end_incl_start:
|
||||
out << "excl_end_incl_start";
|
||||
break;
|
||||
case sstables::bound_kind_m::static_clustering:
|
||||
out << "static_clustering";
|
||||
break;
|
||||
case sstables::bound_kind_m::clustering:
|
||||
out << "clustering";
|
||||
break;
|
||||
case sstables::bound_kind_m::incl_end_excl_start:
|
||||
out << "incl_end_excl_start";
|
||||
break;
|
||||
case sstables::bound_kind_m::incl_end:
|
||||
out << "incl_end";
|
||||
break;
|
||||
case sstables::bound_kind_m::excl_start:
|
||||
out << "excl_start";
|
||||
break;
|
||||
default:
|
||||
out << static_cast<unsigned>(kind);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
} // namespace sstables
|
||||
|
||||
@@ -98,35 +98,3 @@ inline gc_clock::time_point parse_expiry(const serialization_header& header,
|
||||
}
|
||||
|
||||
}; // namespace sstables
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& out, sstables::bound_kind_m kind) {
|
||||
switch (kind) {
|
||||
case sstables::bound_kind_m::excl_end:
|
||||
out << "excl_end";
|
||||
break;
|
||||
case sstables::bound_kind_m::incl_start:
|
||||
out << "incl_start";
|
||||
break;
|
||||
case sstables::bound_kind_m::excl_end_incl_start:
|
||||
out << "excl_end_incl_start";
|
||||
break;
|
||||
case sstables::bound_kind_m::static_clustering:
|
||||
out << "static_clustering";
|
||||
break;
|
||||
case sstables::bound_kind_m::clustering:
|
||||
out << "clustering";
|
||||
break;
|
||||
case sstables::bound_kind_m::incl_end_excl_start:
|
||||
out << "incl_end_excl_start";
|
||||
break;
|
||||
case sstables::bound_kind_m::incl_end:
|
||||
out << "incl_end";
|
||||
break;
|
||||
case sstables::bound_kind_m::excl_start:
|
||||
out << "excl_start";
|
||||
break;
|
||||
default:
|
||||
out << static_cast<unsigned>(kind);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "clustering_bounds_comparator.hh"
|
||||
#include <iosfwd>
|
||||
|
||||
namespace sstables {
|
||||
|
||||
@@ -94,4 +95,6 @@ inline bound_kind boundary_to_end_bound(bound_kind_m kind) {
|
||||
return (kind == bound_kind_m::incl_end_excl_start) ? bound_kind::incl_end : bound_kind::excl_end;
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& out, sstables::bound_kind_m kind);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user