@@ -74,11 +74,6 @@ class Tags {
7474 [[nodiscard]] table_t ::const_iterator end () const { return entries_.end (); }
7575};
7676
77- inline std::ostream& operator <<(std::ostream& os, const Tags& tags) {
78- os << fmt::format (" {}" , tags);
79- return os;
80- }
81-
8277class Id {
8378 public:
8479 Id (absl::string_view name, Tags tags) noexcept
@@ -131,11 +126,6 @@ class Id {
131126 }
132127 }
133128
134- friend std::ostream& operator <<(std::ostream& os, const Id& id) {
135- os << fmt::format (" {}" , id);
136- return os;
137- }
138-
139129 friend struct std ::hash<Id>;
140130
141131 friend struct std ::hash<std::shared_ptr<Id>>;
@@ -186,7 +176,7 @@ struct equal_to<shared_ptr<spectator::Id>> {
186176
187177} // namespace std
188178
189- template <> struct fmt ::formatter<spectator::Tags>: formatter<std::string_view> {
179+ template <> struct fmt ::formatter<spectator::Tags>: fmt:: formatter<std::string_view> {
190180 auto format (const spectator::Tags& tags, format_context& ctx) const -> format_context::iterator {
191181 std::string s;
192182 auto size = tags.size ();
@@ -216,8 +206,18 @@ template <> struct fmt::formatter<spectator::Tags>: formatter<std::string_view>
216206 }
217207};
218208
219- template <> struct fmt ::formatter<spectator::Id>: formatter<std::string_view> {
209+ inline auto operator <<(std::ostream& os, const spectator::Tags& tags) -> std::ostream& {
210+ os << fmt::format (" {}" , tags);
211+ return os;
212+ }
213+
214+ template <> struct fmt ::formatter<spectator::Id>: fmt::formatter<std::string_view> {
220215 static auto format (const spectator::Id& id, format_context& ctx) -> format_context::iterator {
221216 return fmt::format_to (ctx.out (), " Id(name={}, tags={})" , id.Name (), id.GetTags ());
222217 }
223218};
219+
220+ inline auto operator <<(std::ostream& os, const spectator::Id& id) -> std::ostream& {
221+ os << fmt::format (" {}" , id);
222+ return os;
223+ }
0 commit comments