mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-29 16:40:39 +08:00
Fix C++17 detection for clang
Clang (even recent, e.g. llvm 16) sets __GNUC__ to 4, so the check for C++17 fails. This results in the check for invoke_result_t in phmap_base.h failing, so it uses std::result_of, which is removed entirely in recent libc++, breaking the build.
This commit is contained in:
Vendored
+2
-1
@@ -120,7 +120,8 @@
|
|||||||
#define PHMAP_HAVE_BUILTIN(x) 0
|
#define PHMAP_HAVE_BUILTIN(x) 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (!defined(__GNUC__) || __GNUC__ >= 5) && ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
|
#if (!defined(__GNUC__) || defined(__clang__) || __GNUC__ >= 5) && \
|
||||||
|
((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
|
||||||
#define PHMAP_HAVE_CC17 1
|
#define PHMAP_HAVE_CC17 1
|
||||||
#else
|
#else
|
||||||
#define PHMAP_HAVE_CC17 0
|
#define PHMAP_HAVE_CC17 0
|
||||||
|
|||||||
Reference in New Issue
Block a user