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=8191c81344fe0dd0453cc113ae5df25c63565805;p=ceph.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 cc888465196b..a15d790ef552 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -114,6 +114,8 @@ template inline std::ostream& operator<<(std::ostream& out, const std::unordered_map& m); template 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 { @@ -293,6 +295,22 @@ 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 {