Skip to content

Commit 08d4141

Browse files
committed
Added hash_value for buffer.
1 parent 13d5192 commit 08d4141

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/mqtt/buffer.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ class buffer : public MQTT_NS::string_view {
8383
const_shared_ptr_array lifetime_;
8484
};
8585

86+
inline std::size_t hash_value(buffer const& v) {
87+
std::size_t ret = 0;
88+
boost::hash_combine(ret, static_cast<MQTT_NS::string_view const&>(v));
89+
return ret;
90+
}
91+
8692
inline namespace literals {
8793

8894
/**

0 commit comments

Comments
 (0)