From: Adam C. Emerson Date: Tue, 21 Oct 2025 19:06:56 +0000 (-0400) Subject: include/types: Add std::unordered_multimap support X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d7f8213019ace72770d5b39fe128e9bfcee2433f;p=ceph-ci.git include/types: Add std::unordered_multimap support Signed-off-by: Adam C. Emerson --- diff --git a/src/include/types.h b/src/include/types.h index cc888465196..e277afbee6a 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -115,6 +115,10 @@ inline std::ostream& operator<<(std::ostream& out, const std::unordered_map inline std::ostream& operator<<(std::ostream& out, const std::multimap& m); } +template +inline std::ostream& operator<<( + std::ostream& out, + const std::unordered_multimap& m); namespace boost { template @@ -293,6 +297,25 @@ inline std::ostream& operator<<(std::ostream& out, const std::multimap +inline std::ostream& +operator<<( + std::ostream& out, + const std::unordered_multimap& m) +{ + out << "{{"; + for (auto it = m.begin(); + it != m.end(); + ++it) { + if (it != m.begin()) out << ","; + out << it->first << "=" << it->second; + } + out << "}}"; + return out; +} + + + } // namespace std namespace boost {