]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librgw: fix boost::basic_string_ref template instantiation
authorMatt Benjamin <mbenjamin@redhat.com>
Wed, 3 Feb 2016 23:02:49 +0000 (18:02 -0500)
committerMatt Benjamin <mbenjamin@redhat.com>
Fri, 12 Feb 2016 18:07:25 +0000 (13:07 -0500)
The commit adding Seastar sstring.h replaced a part of the interface
which used an internal string-view type, with an equivalent using
basic_string_ref from Boost.  I relied on a default template argument
not present in older versions.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/common/sstring.hh

index a2354080e225839f03bf6838aabf67957fe647ce..b0f7a12c7cd5b79fda6d9b8af71c1c0d0f3ee97b 100644 (file)
@@ -533,8 +533,8 @@ public:
     const char_type& operator[](size_type pos) const {
         return str()[pos];
     }
-    operator boost::basic_string_ref<char_type>() const {
-       return boost::basic_string_ref<char_type>(str(), size());
+    operator boost::basic_string_ref<char_type, traits_type>() const {
+               return boost::basic_string_ref<char_type, traits_type>(str(), size());
     }
     template <typename string_type, typename T>
     friend inline string_type to_sstring(T value);
@@ -616,7 +616,8 @@ namespace std {
 template <typename char_type, typename size_type, size_type max_size>
 struct hash<basic_sstring<char_type, size_type, max_size>> {
     size_t operator()(const basic_sstring<char_type, size_type, max_size>& s) const {
-       return std::hash<boost::basic_string_ref<char_type>>()(s);
+               using traits_type = std::char_traits<char_type>;
+               return std::hash<boost::basic_string_ref<char_type,traits_type>>()(s);
     }
 };