We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13d5192 commit d2e512eCopy full SHA for d2e512e
include/mqtt/string_view.hpp
@@ -32,6 +32,7 @@ using std::basic_string_view;
32
#define MQTT_NO_BOOST_STRING_VIEW 0
33
34
#include <boost/utility/string_view.hpp>
35
+#include <boost/container_hash/hash_fwd.hpp>
36
37
namespace MQTT_NS {
38
@@ -40,6 +41,14 @@ using string_view = boost::string_view;
40
41
template<class CharT, class Traits = std::char_traits<CharT> >
42
using basic_string_view = boost::basic_string_view<CharT, Traits>;
43
44
+#if BOOST_VERSION < 106900
45
+
46
+template <class charT, class traits>
47
+std::size_t hash_value(basic_string_view<charT, traits> s) {
48
+ return boost::hash_range(s.begin(), s.end());
49
+}
50
+#endif // BOOST_VERSION < 106900
51
52
} // namespace MQTT_NS
53
54
#else // BOOST_VERSION >= 106100
0 commit comments