Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#6337 closed Feature Requests (duplicate)

support hashing thread::id

Reported by: Kohei Takahashi <flast@…> Owned by: Anthony Williams
Milestone: To Be Determined Component: thread
Version: Boost 1.48.0 Severity: Not Applicable
Keywords: Cc:

Description

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());
}

Change History (2)

comment:1 by viboes, 11 years ago

Resolution: duplicate
Status: newclosed

Duplicated #6272 c++11 compliance: Add thread::id hash specialization

in reply to:  1 comment:2 by Kohei Takahashi <flast@…>, 11 years ago

Replying to viboes:

Duplicated #6272 c++11 compliance: Add thread::id hash specialization

Does #6272 include supporting Functional/Hash's one? Not only to support std::hash ?

Note: See TracTickets for help on using tickets.