| 1515 | */ |
| 1516 | BOOST_AUTO_TEST_CASE(test_heterogeneous_lookups) { |
| 1517 | struct hash_ptr { |
| 1518 | std::size_t operator()(const std::unique_ptr<int>& p) const { |
| 1519 | return std::hash<std::uintptr_t>()( |
| 1520 | reinterpret_cast<std::uintptr_t>(p.get())); |
| 1521 | } |
| 1522 | |
| 1523 | std::size_t operator()(std::uintptr_t p) const { |
| 1524 | return std::hash<std::uintptr_t>()(p); |
| 1525 | } |
| 1526 | |
| 1527 | std::size_t operator()(const int* const& p) const { |
| 1528 | return std::hash<std::uintptr_t>()(reinterpret_cast<std::uintptr_t>(p)); |
| 1529 | } |
| 1530 | }; |
| 1531 | |
| 1532 | struct equal_to_ptr { |
| 1533 | using is_transparent = std::true_type; |
nothing calls this directly
no outgoing calls
no test coverage detected