mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-30 00:50:38 +08:00
fix compilation issue with string_view
This commit is contained in:
Vendored
+5
-2
@@ -296,7 +296,8 @@
|
||||
#endif
|
||||
|
||||
#ifdef __has_include
|
||||
#if __has_include(<string_view>) && __cplusplus >= 201703L
|
||||
#if __has_include(<string_view>) && __cplusplus >= 201703L && \
|
||||
(!defined(_MSC_VER) || _MSC_VER >= 1920) // vs2019
|
||||
#define PHMAP_HAVE_STD_STRING_VIEW 1
|
||||
#endif
|
||||
#endif
|
||||
@@ -308,7 +309,9 @@
|
||||
// #define PHMAP_HAVE_STD_ANY 1
|
||||
#define PHMAP_HAVE_STD_OPTIONAL 1
|
||||
#define PHMAP_HAVE_STD_VARIANT 1
|
||||
#define PHMAP_HAVE_STD_STRING_VIEW 1
|
||||
#if !defined(PHMAP_HAVE_STD_STRING_VIEW) && _MSC_VER >= 1920
|
||||
#define PHMAP_HAVE_STD_STRING_VIEW 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (defined(_MSVC_LANG) && _MSVC_LANG >= 201703) || __cplusplus >= 201703
|
||||
|
||||
Vendored
+1
-1
@@ -123,7 +123,7 @@ private:
|
||||
typedef std::true_type yes;
|
||||
typedef std::false_type no;
|
||||
|
||||
template<typename U> static auto test(int) -> decltype(hash_value(std::declval<U&>()) == 1, yes());
|
||||
template<typename U> static auto test(int) -> decltype(hash_value(std::declval<const U&>()) == 1, yes());
|
||||
|
||||
template<typename> static no test(...);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user