]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/encoding: fix the build with clang
authorKefu Chai <kchai@redhat.com>
Tue, 25 Oct 2016 04:26:20 +0000 (12:26 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 25 Oct 2016 04:40:46 +0000 (12:40 +0800)
put the overloaded operator<<() into namespace std, so clang's name
resolution is able to find it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/encoding.cc

index c6c7fe0a4ac830e421a6395c1899ca697b7cdb60..c96d59a72e8d7c329749b62de1a775937192776b 100644 (file)
@@ -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;