Subject: [Boost-bugs] [Boost C++ Libraries] #6337: support hashing thread::id
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-12-30 15:52:49
#6337: support hashing thread::id
----------------------------------------------+-----------------------------
Reporter: Kohei Takahashi <flast@â¦> | Owner: anthonyw
Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: thread
Version: Boost 1.48.0 | Severity: Not Applicable
Keywords: |
----------------------------------------------+-----------------------------
I propose to be able to use thread::id as key type of unordered
associative container, add hash_value free function under boost namespace.
Simple implementation is here.
{{{
// Should include boost/functional/hash.hpp
// and declare as friend of thread::id.
std::size_t
hash_value(const thread::id &v)
{
return hash_value(v.thread_data.get());
}
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6337> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:08 UTC