forked from boostorg/unordered
Add tsl::hopscotch_map to uint32.cpp
This commit is contained in:
@ -14,6 +14,9 @@
|
|||||||
# include "absl/container/node_hash_map.h"
|
# include "absl/container/node_hash_map.h"
|
||||||
# include "absl/container/flat_hash_map.h"
|
# include "absl/container/flat_hash_map.h"
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_TSL_HOPSCOTCH
|
||||||
|
# include "tsl/hopscotch_map.h"
|
||||||
|
#endif
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@ -311,6 +314,16 @@ template<class K, class V> using absl_flat_hash_map =
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TSL_HOPSCOTCH
|
||||||
|
|
||||||
|
template<class K, class V> using tsl_hopscotch_map =
|
||||||
|
tsl::hopscotch_map<K, V, std::hash<K>, std::equal_to<K>, allocator_for<K, V>>;
|
||||||
|
|
||||||
|
template<class K, class V> using tsl_hopscotch_pg_map =
|
||||||
|
tsl::hopscotch_pg_map<K, V, std::hash<K>, std::equal_to<K>, allocator_for<K, V>>;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
init_indices();
|
init_indices();
|
||||||
@ -324,6 +337,13 @@ int main()
|
|||||||
test<absl_node_hash_map>( "absl::node_hash_map" );
|
test<absl_node_hash_map>( "absl::node_hash_map" );
|
||||||
test<absl_flat_hash_map>( "absl::flat_hash_map" );
|
test<absl_flat_hash_map>( "absl::flat_hash_map" );
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TSL_HOPSCOTCH
|
||||||
|
|
||||||
|
test<tsl_hopscotch_map>( "tsl::hopscotch_map" );
|
||||||
|
test<tsl_hopscotch_pg_map>( "tsl::hopscotch_pg_map" );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::cout << "---\n\n";
|
std::cout << "---\n\n";
|
||||||
|
Reference in New Issue
Block a user