summaryrefslogtreecommitdiffstats
path: root/src/test/encoding.cc
diff options
context:
space:
mode:
authorKefu Chai <kchai@redhat.com>2016-10-25 06:26:20 +0200
committerKefu Chai <kchai@redhat.com>2016-10-25 06:40:46 +0200
commit71b1f758a72ae86c4b2f5442fcec6ac21acf1659 (patch)
treed93a38aa045e38edde6101ee1f7b21cd91f86d61 /src/test/encoding.cc
parentcmake: add definitions for glibc (diff)
downloadceph-71b1f758a72ae86c4b2f5442fcec6ac21acf1659.tar.xz
ceph-71b1f758a72ae86c4b2f5442fcec6ac21acf1659.zip
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 <kchai@redhat.com>
Diffstat (limited to 'src/test/encoding.cc')
-rw-r--r--src/test/encoding.cc2
1 files changed, 2 insertions, 0 deletions
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;