From: Kefu Chai Date: Tue, 25 Oct 2016 04:26:20 +0000 (+0800) Subject: test/encoding: fix the build with clang X-Git-Tag: v11.1.0~500^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=71b1f758a72ae86c4b2f5442fcec6ac21acf1659;p=ceph.git test/encoding: fix the build with clang put the overloaded operator<<() into namespace std, so clang's name resolution is able to find it. Signed-off-by: Kefu Chai --- diff --git a/src/test/encoding.cc b/src/test/encoding.cc index c6c7fe0a4ac..c96d59a72e8 100644 --- a/src/test/encoding.cc +++ b/src/test/encoding.cc @@ -35,6 +35,7 @@ TEST(EncodingRoundTrip, StringNewline) { typedef std::multimap < int, std::string > multimap_t; typedef multimap_t::value_type my_val_ty; +namespace std { static std::ostream& operator<<(std::ostream& oss, const multimap_t &multimap) { for (multimap_t::const_iterator m = multimap.begin(); @@ -45,6 +46,7 @@ static std::ostream& operator<<(std::ostream& oss, const multimap_t &multimap) } return oss; } +} TEST(EncodingRoundTrip, Multimap) { multimap_t multimap;