diff options
author | Kefu Chai <kchai@redhat.com> | 2016-10-25 06:26:20 +0200 |
---|---|---|
committer | Kefu Chai <kchai@redhat.com> | 2016-10-25 06:40:46 +0200 |
commit | 71b1f758a72ae86c4b2f5442fcec6ac21acf1659 (patch) | |
tree | d93a38aa045e38edde6101ee1f7b21cd91f86d61 /src/test/encoding.cc | |
parent | cmake: add definitions for glibc (diff) | |
download | ceph-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.cc | 2 |
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; |