mirror of
https://github.com/FEX-Emu/robin-map.git
synced 2024-11-23 06:09:52 +00:00
Add tsl::robin_pg_map and tsl::robin_pg_set for a shortcut to use ts::prime_growth_policy_rh.
This commit is contained in:
parent
3fce9da9fb
commit
b3aeed0544
@ -60,9 +60,7 @@ using test_types = boost::mpl::list<
|
||||
tsl::robin_map<move_only_test, move_only_test, mod_hash<9>, std::equal_to<move_only_test>,
|
||||
std::allocator<std::pair<move_only_test, move_only_test>>, true,
|
||||
tsl::power_of_two_growth_policy_rh<4>>,
|
||||
tsl::robin_map<move_only_test, move_only_test, mod_hash<9>, std::equal_to<move_only_test>,
|
||||
std::allocator<std::pair<move_only_test, move_only_test>>, false,
|
||||
tsl::prime_growth_policy_rh>,
|
||||
tsl::robin_pg_map<move_only_test, move_only_test, mod_hash<9>>,
|
||||
tsl::robin_map<move_only_test, move_only_test, mod_hash<9>, std::equal_to<move_only_test>,
|
||||
std::allocator<std::pair<move_only_test, move_only_test>>, false,
|
||||
tsl::mod_growth_policy_rh<>>,
|
||||
@ -70,9 +68,7 @@ using test_types = boost::mpl::list<
|
||||
tsl::robin_map<copy_only_test, copy_only_test, mod_hash<9>, std::equal_to<copy_only_test>,
|
||||
std::allocator<std::pair<copy_only_test, copy_only_test>>, false,
|
||||
tsl::power_of_two_growth_policy_rh<4>>,
|
||||
tsl::robin_map<copy_only_test, copy_only_test, mod_hash<9>, std::equal_to<copy_only_test>,
|
||||
std::allocator<std::pair<copy_only_test, copy_only_test>>, true,
|
||||
tsl::prime_growth_policy_rh>,
|
||||
tsl::robin_pg_map<copy_only_test, copy_only_test, mod_hash<9>>,
|
||||
tsl::robin_map<copy_only_test, copy_only_test, mod_hash<9>, std::equal_to<copy_only_test>,
|
||||
std::allocator<std::pair<copy_only_test, copy_only_test>>, true,
|
||||
tsl::mod_growth_policy_rh<>>
|
||||
|
@ -44,12 +44,7 @@ using test_types = boost::mpl::list<tsl::robin_set<std::int64_t>,
|
||||
tsl::robin_set<std::string>,
|
||||
tsl::robin_set<self_reference_member_test>,
|
||||
tsl::robin_set<move_only_test>,
|
||||
tsl::robin_set<self_reference_member_test,
|
||||
std::hash<self_reference_member_test>,
|
||||
std::equal_to<self_reference_member_test>,
|
||||
std::allocator<self_reference_member_test>,
|
||||
false,
|
||||
tsl::prime_growth_policy_rh>,
|
||||
tsl::robin_pg_set<self_reference_member_test>,
|
||||
tsl::robin_set<move_only_test,
|
||||
std::hash<move_only_test>,
|
||||
std::equal_to<move_only_test>,
|
||||
|
@ -647,11 +647,19 @@ public:
|
||||
lhs.swap(rhs);
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
ht m_ht;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
template<class Key,
|
||||
class T,
|
||||
class Hash = std::hash<Key>,
|
||||
class KeyEqual = std::equal_to<Key>,
|
||||
class Allocator = std::allocator<std::pair<Key, T>>,
|
||||
bool StoreHash = false>
|
||||
using robin_pg_map = robin_map<Key, T, Hash, KeyEqual, Allocator, StoreHash, tsl::prime_growth_policy_rh>;
|
||||
|
||||
} // end namespace tsl
|
||||
|
||||
#endif
|
||||
|
@ -518,6 +518,14 @@ private:
|
||||
ht m_ht;
|
||||
};
|
||||
|
||||
|
||||
template<class Key,
|
||||
class Hash = std::hash<Key>,
|
||||
class KeyEqual = std::equal_to<Key>,
|
||||
class Allocator = std::allocator<Key>,
|
||||
bool StoreHash = false>
|
||||
using robin_pg_set = robin_set<Key, Hash, KeyEqual, Allocator, StoreHash, tsl::prime_growth_policy_rh>;
|
||||
|
||||
} // end namespace tsl
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user