21 typedef std::pair<int, double> key_type;
23 std::unordered_set<key_type, bphash::StdHash<key_type>> us;
24 us.emplace(key_type{0, 10.1});
25 us.emplace(key_type{1, 10.2});
26 us.emplace(key_type{2, 10.3});
27 us.emplace(key_type{3, 10.4});
28 us.emplace(key_type{4, 10.5});
29 us.emplace(key_type{5, 10.5});
30 us.emplace(key_type{5, 10.5});
35 std::cout <<
"Elements in unordered set: " << us.size() <<
"\n";
36 for(
const auto & it : us)
37 std::cout <<
" -> (" << it.first <<
" " << it.second <<
")\n";
A class that hashes objects (header)
A class that can be used in place of std::hash.
A convenience header that includes all the types supported by bphash.