17#ifndef TOOLBOX_UTIL_ROBINHOOD_HPP
18#define TOOLBOX_UTIL_ROBINHOOD_HPP
20#pragma GCC diagnostic push
21#pragma GCC diagnostic ignored "-Wstrict-aliasing"
22#include <toolbox/contrib/robin_hood.h>
23#pragma GCC diagnostic pop
26inline namespace util {
29template <
typename KeyT>
36template <
typename KeyT,
typename ValueT,
typename HashT = RobinHash<KeyT>,
37 typename KeyEqualT = std::equal_to<KeyT>, std::
size_t MaxLoadFactor100N = 80>
38using RobinMap = robin_hood::unordered_map<KeyT, ValueT, HashT, KeyEqualT, MaxLoadFactor100N>;
41template <
typename KeyT,
typename ValueT,
typename HashT = RobinHash<KeyT>,
42 typename KeyEqualT = std::equal_to<KeyT>, std::
size_t MaxLoadFactor100N = 80>
44 = robin_hood::unordered_flat_map<KeyT, ValueT, HashT, KeyEqualT, MaxLoadFactor100N>;
47template <
typename KeyT,
typename ValueT,
typename HashT = RobinHash<KeyT>,
48 typename KeyEqualT = std::equal_to<KeyT>, std::
size_t MaxLoadFactor100N = 80>
50 = robin_hood::unordered_node_map<KeyT, ValueT, HashT, KeyEqualT, MaxLoadFactor100N>;
56template <
typename KeyT,
typename HashT = RobinHash<KeyT>,
typename KeyEqualT = std::equal_to<KeyT>,
57 std::
size_t MaxLoadFactor100N = 80>
58using RobinSet = robin_hood::unordered_set<KeyT, HashT, KeyEqualT, MaxLoadFactor100N>;
61template <
typename KeyT,
typename HashT = RobinHash<KeyT>,
typename KeyEqualT = std::equal_to<KeyT>,
62 std::
size_t MaxLoadFactor100N = 80>
63using RobinFlatSet = robin_hood::unordered_flat_set<KeyT, HashT, KeyEqualT, MaxLoadFactor100N>;
66template <
typename KeyT,
typename HashT = RobinHash<KeyT>,
typename KeyEqualT = std::equal_to<KeyT>,
67 std::
size_t MaxLoadFactor100N = 80>
68using RobinNodeSet = robin_hood::unordered_node_set<KeyT, HashT, KeyEqualT, MaxLoadFactor100N>;