mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-30 00:50:38 +08:00
flat_hash_map test passes
This commit is contained in:
Vendored
+17
@@ -48,9 +48,26 @@ if (PHMAP_BUILD_TESTS)
|
||||
check_target(gtest_main)
|
||||
check_target(gmock)
|
||||
|
||||
# include_directories(${CMAKE_CURRENT_SOURCE_DIR}/parallel_hashmap)
|
||||
|
||||
phmap_cc_test(NAME flat_hash_set SRCS "tests/flat_hash_set_test.cc"
|
||||
COPTS "-DUNORDERED_SET_CXX17" DEPS gmock_main)
|
||||
|
||||
phmap_cc_test(NAME flat_hash_map SRCS "tests/flat_hash_map_test.cc"
|
||||
DEPS gmock_main)
|
||||
|
||||
phmap_cc_test(NAME parallel_flat_hash_map SRCS "tests/parallel_flat_hash_map_test.cc"
|
||||
COPTS "-DUNORDERED_MAP_CXX17" DEPS gmock_main)
|
||||
|
||||
phmap_cc_test(NAME parallel_flat_hash_set SRCS "tests/parallel_flat_hash_set_test.cc"
|
||||
COPTS "-DUNORDERED_SET_CXX17" DEPS gmock_main)
|
||||
|
||||
phmap_cc_test(NAME node_hash_map SRCS "tests/node_hash_map_test.cc"
|
||||
DEPS gmock_main)
|
||||
|
||||
phmap_cc_test(NAME node_hash_set SRCS "tests/node_hash_set_test.cc"
|
||||
COPTS "-DUNORDERED_SET_CXX17" DEPS gmock_main)
|
||||
|
||||
endif()
|
||||
|
||||
if (PHMAP_BUILD_EXAMPLES)
|
||||
|
||||
Vendored
+2
-3
@@ -47,10 +47,9 @@ template <class T> T phmap_max(T a, T b) { return a >= b ? a : b; }
|
||||
template <class T>
|
||||
struct Hash
|
||||
{
|
||||
inline size_t operator()(const T &__v) const noexcept
|
||||
inline size_t operator()(const T& __v) noexcept
|
||||
{
|
||||
PHMAP_HASH_CLASS<T> hasher;
|
||||
return hasher(__v);
|
||||
return PHMAP_HASH_CLASS<T>()(__v);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user