Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
msimberg committed Jan 27, 2021
2 parents 405b198 + 7226dda commit dd15712
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <cstddef>
#include <cstdint>
#include <functional>
#include <memory>
#include <utility>

Expand Down
15 changes: 15 additions & 0 deletions libs/parallelism/threading/include/hpx/threading/thread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <cstddef>
#include <exception>
#include <functional>
#include <iosfwd>
#include <mutex>
#include <type_traits>
Expand Down Expand Up @@ -310,4 +311,18 @@ namespace hpx {
} // namespace this_thread
} // namespace hpx

namespace std {

// specialize std::hash for hpx::thread::id
template <>
struct hash<::hpx::thread::id>
{
std::size_t operator()(::hpx::thread::id const& id) const
{
std::hash<::hpx::threads::thread_id_type> hasher_;
return hasher_(id.native_handle());
}
};
} // namespace std

#include <hpx/config/warnings_suffix.hpp>

0 comments on commit dd15712

Please sign in to comment.