Boost C++ Libraries: Ticket #6337: support hashing thread::id https://svn.boost.org/trac10/ticket/6337 <p> I propose to be able to use thread::id as key type of unordered associative container, add hash_value free function under boost namespace. </p> <p> Simple implementation is here. </p> <pre class="wiki">// Should include boost/functional/hash.hpp // and declare as friend of thread::id. std::size_t hash_value(const thread::id &amp;v) { return hash_value(v.thread_data.get()); } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6337 Trac 1.4.3 viboes Fri, 30 Dec 2011 23:00:58 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6337#comment:1 https://svn.boost.org/trac10/ticket/6337#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> <p> Duplicated <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6272" title="#6272: Feature Requests: c++11 compliance: Add thread::id hash specialization (closed: fixed)">#6272</a> c++11 compliance: Add thread::id hash specialization </p> Ticket Kohei Takahashi <flast@…> Fri, 30 Dec 2011 23:29:26 GMT <link>https://svn.boost.org/trac10/ticket/6337#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6337#comment:2</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/6337#comment:1" title="Comment 1">viboes</a>: </p> <blockquote class="citation"> <p> Duplicated <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6272" title="#6272: Feature Requests: c++11 compliance: Add thread::id hash specialization (closed: fixed)">#6272</a> c++11 compliance: Add thread::id hash specialization </p> </blockquote> <p> Does <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6272" title="#6272: Feature Requests: c++11 compliance: Add thread::id hash specialization (closed: fixed)">#6272</a> include supporting <a class="missing wiki">Functional/Hash</a>'s one? Not only to support std::hash ? </p> </description> <category>Ticket</category> </item> </channel> </rss>