According to the documentation, a boost::thread::id
can be considered unique for each running thread and can be used in containers such as std::set
and std::map
(because the <
operator is overridden for thread::id
).
My problem is that I'd like to use thread::id
as a key to an boost::unordered_map
, however it requires that the key is "hashable" (ie. supports hashing to a size_t
). Since all implementation detail for thread::id is hidden I don't think have anything I can use.
So my question is - is it possible to use thread::id as a key to an unordered_map?