diff --git a/sstables/m_format_read_helpers.cc b/sstables/m_format_read_helpers.cc index 7a9f2981bc..6d4d8ed7de 100644 --- a/sstables/m_format_read_helpers.cc +++ b/sstables/m_format_read_helpers.cc @@ -58,4 +58,36 @@ future read_signed_vint(random_access_reader& in) { return read_vint_impl(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(kind); + } + return out; +} + } // namespace sstables diff --git a/sstables/m_format_read_helpers.hh b/sstables/m_format_read_helpers.hh index 674a17ec3e..efddca3cc3 100644 --- a/sstables/m_format_read_helpers.hh +++ b/sstables/m_format_read_helpers.hh @@ -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(kind); - } - return out; -} diff --git a/sstables/mx/types.hh b/sstables/mx/types.hh index f419d18481..91c59b6885 100644 --- a/sstables/mx/types.hh +++ b/sstables/mx/types.hh @@ -22,6 +22,7 @@ #pragma once #include "clustering_bounds_comparator.hh" +#include 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); + }