in spectator/id.h [190:216]
auto format(const spectator::Tags& tags, format_context& ctx) const -> format_context::iterator {
std::string s;
auto size = tags.size();
if (size > 0) {
// sort keys, to ensure stable output
std::vector<std::string> keys;
for (const auto& pair : tags) {
keys.push_back(pair.first);
}
std::sort(keys.begin(), keys.end());
s = "[";
for (const auto &key : keys) {
if (size > 1) {
s += key + "=" + tags.at(key) + ", ";
} else {
s += key + "=" + tags.at(key) + "]";
}
size -= 1;
}
} else {
s = "[]";
}
return fmt::formatter<std::string_view>::format(s, ctx);
}