mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-29 16:40:39 +08:00
add more tests - they all pass on windows / vs2017
This commit is contained in:
Vendored
+11
-7
@@ -52,6 +52,10 @@
|
||||
#include "phmap_base.h"
|
||||
#include "phmap_utils.h"
|
||||
|
||||
#if PHMAP_HAVE_STD_STRING_VIEW
|
||||
#include <string_view>
|
||||
#endif
|
||||
|
||||
namespace phmap {
|
||||
namespace container_internal {
|
||||
|
||||
@@ -479,7 +483,7 @@ inline size_t GrowthToLowerboundCapacity(size_t growth)
|
||||
return growth + static_cast<size_t>((static_cast<int64_t>(growth) - 1) / 7);
|
||||
}
|
||||
|
||||
namespace debug {
|
||||
namespace hashtable_debug_internal {
|
||||
|
||||
// If it is a map, call get<0>().
|
||||
using std::get;
|
||||
@@ -522,7 +526,7 @@ struct HashtableDebugAccess
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace debug
|
||||
} // namespace hashtable_debug_internal
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// I N F O Z S T U B S
|
||||
@@ -565,7 +569,7 @@ public:
|
||||
|
||||
using DisposeCallback = void (*)(const HashtablezInfo&);
|
||||
DisposeCallback SetDisposeCallback(DisposeCallback f) {}
|
||||
int64_t Iterate(const std::function<void(const HashtablezInfo& stack)>& f) {}
|
||||
int64_t Iterate(const std::function<void(const HashtablezInfo& stack)>& f) { return 0; }
|
||||
};
|
||||
|
||||
void SetHashtablezEnabled(bool enabled) {}
|
||||
@@ -1526,7 +1530,7 @@ public:
|
||||
|
||||
private:
|
||||
template <class Container, typename Enabler>
|
||||
friend struct phmap::container_internal::debug::HashtableDebugAccess;
|
||||
friend struct phmap::container_internal::hashtable_debug_internal::HashtableDebugAccess;
|
||||
|
||||
struct FindElement
|
||||
{
|
||||
@@ -3027,7 +3031,7 @@ public:
|
||||
|
||||
private:
|
||||
template <class Container, typename Enabler>
|
||||
friend struct phmap::container_internal::debug::HashtableDebugAccess;
|
||||
friend struct phmap::container_internal::hashtable_debug_internal::HashtableDebugAccess;
|
||||
|
||||
struct FindElement
|
||||
{
|
||||
@@ -4092,7 +4096,7 @@ template <class T>
|
||||
using hash_default_eq = typename container_internal::HashEq<T>::Eq;
|
||||
|
||||
|
||||
namespace debug {
|
||||
namespace hashtable_debug_internal {
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// --------------------------------------------------------------------------
|
||||
@@ -4155,7 +4159,7 @@ struct HashtableDebugAccess<Set, phmap::void_t<typename Set::raw_hash_set>>
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace debug
|
||||
} // namespace hashtable_debug_internal
|
||||
} // namespace container_internal
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
Vendored
-10
@@ -2896,20 +2896,10 @@ struct InsertReturnType
|
||||
#include <sanitizer/asan_interface.h>
|
||||
#endif
|
||||
|
||||
//#include "absl/strings/str_cat.h"
|
||||
//#include "absl/types/span.h"
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// span.h
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
//#include "absl/algorithm/algorithm.h"
|
||||
//#include "absl/base/internal/throw_delegate.h"
|
||||
//#include "absl/base/macros.h"
|
||||
//#include "absl/base/optimization.h"
|
||||
//#include "absl/base/port.h"
|
||||
//#include "absl/meta/type_traits.h"
|
||||
|
||||
namespace phmap {
|
||||
|
||||
template <typename T>
|
||||
|
||||
Vendored
+6
@@ -53,6 +53,10 @@
|
||||
#include <TargetConditionals.h>
|
||||
#endif
|
||||
|
||||
#define PHMAP_XSTR(x) PHMAP_STR(x)
|
||||
#define PHMAP_STR(x) #x
|
||||
#define PHMAP_VAR_NAME_VALUE(var) #var "=" PHMAP_STR(var)
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Some sanity checks
|
||||
// -----------------------------------------------------------------------------
|
||||
@@ -297,6 +301,8 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// #pragma message(PHMAP_VAR_NAME_VALUE(_MSVC_LANG))
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1910 && \
|
||||
((defined(_MSVC_LANG) && _MSVC_LANG > 201402) || __cplusplus > 201402)
|
||||
// #define PHMAP_HAVE_STD_ANY 1
|
||||
|
||||
Reference in New Issue
Block a user