]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/sstring: switch to boost::string_view as string_ref is deprecated.
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>
Tue, 23 May 2017 13:23:19 +0000 (15:23 +0200)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Wed, 7 Jun 2017 10:46:21 +0000 (12:46 +0200)
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
src/common/sstring.hh

index 4b75e0976814fa7010835bba3e394c6afeb777b6..3783cc1efac6c5c2586a69a99d00f9a54772f8e5 100644 (file)
@@ -27,7 +27,7 @@
 #define SSTRING_HH_
 
 #include <type_traits>
-#include <boost/utility/string_ref.hpp>
+#include <boost/utility/string_view.hpp>
 
 #include "include/buffer.h"
 #include "include/denc.h"
@@ -527,8 +527,8 @@ public:
     const char_type& operator[](size_type pos) const {
         return str()[pos];
     }
-    operator boost::basic_string_ref<char_type, traits_type>() const {
-               return boost::basic_string_ref<char_type, traits_type>(str(), size());
+    operator boost::basic_string_view<char_type, traits_type>() const {
+               return boost::basic_string_view<char_type, traits_type>(str(), size());
     }
     template <typename string_type, typename T>
     friend inline string_type to_sstring(T value);
@@ -611,7 +611,7 @@ 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 {
                using traits_type = std::char_traits<char_type>;
-               return std::hash<boost::basic_string_ref<char_type,traits_type>>()(s);
+               return std::hash<boost::basic_string_view<char_type,traits_type>>()(s);
     }
 };