| 473 | template<std::size_t size> struct hash_32_or_64 : public _hash_32_or_64<(size > 4)> { }; |
| 474 | |
| 475 | static inline size_t hash_thread_id(thread_id_t id) |
| 476 | { |
| 477 | static_assert(sizeof(thread_id_t) <= 8, "Expected a platform where thread IDs are at most 64-bit values"); |
| 478 | #if defined(__GNUC__) && !defined(__clang__) |
| 479 | #pragma GCC diagnostic push |
| 480 | #pragma GCC diagnostic ignored "-Wuseless-cast" |
| 481 | #endif |
| 482 | return static_cast<size_t>(hash_32_or_64<sizeof(thread_id_converter<thread_id_t>::thread_id_hash_t)>::hash( |
| 483 | thread_id_converter<thread_id_t>::prehash(id))); |
| 484 | #if defined(__GNUC__) && !defined(__clang__) |
| 485 | #pragma GCC diagnostic pop |
| 486 | #endif |
| 487 | } |
| 488 | |
| 489 | template<typename T> |
| 490 | static inline bool circular_less_than(T a, T b) |
no test coverage detected