mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-29 08:34:39 +08:00
clean up preprocessor directives.
This commit is contained in:
Vendored
+3
-3
@@ -329,10 +329,10 @@ template <typename T>
|
||||
using underlying_type_t = typename std::underlying_type<T>::type;
|
||||
|
||||
template< class F, class... ArgTypes>
|
||||
#if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
|
||||
using invoke_result_t = typename std::invoke_result_t<F, ArgTypes...>;
|
||||
#ifdef PHMAP_HAVE_CC17
|
||||
using invoke_result_t = typename std::invoke_result_t<F, ArgTypes...>;
|
||||
#else
|
||||
using invoke_result_t = typename std::result_of<F(ArgTypes...)>::type;
|
||||
using invoke_result_t = typename std::result_of<F(ArgTypes...)>::type;
|
||||
#endif
|
||||
|
||||
namespace type_traits_internal {
|
||||
|
||||
Vendored
+10
-4
@@ -109,6 +109,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Compiler Feature Checks
|
||||
// -----------------------------------------------------------------------------
|
||||
@@ -119,6 +120,12 @@
|
||||
#define PHMAP_HAVE_BUILTIN(x) 0
|
||||
#endif
|
||||
|
||||
#if (defined(_MSVC_LANG) && _MSVC_LANG >= 201703) || __cplusplus >= 201703
|
||||
#define PHMAP_HAVE_CC17 1
|
||||
#else
|
||||
#define PHMAP_HAVE_CC17 0
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// Checks whether `std::is_trivially_destructible<T>` is supported.
|
||||
// ----------------------------------------------------------------
|
||||
@@ -304,8 +311,7 @@
|
||||
|
||||
// #pragma message(PHMAP_VAR_NAME_VALUE(_MSVC_LANG))
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1910 && \
|
||||
((defined(_MSVC_LANG) && _MSVC_LANG >= 201703) || __cplusplus >= 201703)
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1910 && PHMAP_HAVE_CC17
|
||||
// #define PHMAP_HAVE_STD_ANY 1
|
||||
#define PHMAP_HAVE_STD_OPTIONAL 1
|
||||
#define PHMAP_HAVE_STD_VARIANT 1
|
||||
@@ -314,7 +320,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (defined(_MSVC_LANG) && _MSVC_LANG >= 201703) || __cplusplus >= 201703
|
||||
#if PHMAP_HAVE_CC17
|
||||
#define PHMAP_HAVE_SHARED_MUTEX 1
|
||||
#endif
|
||||
|
||||
@@ -633,7 +639,7 @@
|
||||
// ----------------------------------------------------------------------
|
||||
// constexpr if
|
||||
// ----------------------------------------------------------------------
|
||||
#if __cplusplus >= 201703 || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703)
|
||||
#if PHMAP_HAVE_CC17
|
||||
#define PHMAP_IF_CONSTEXPR(expr) if constexpr ((expr))
|
||||
#else
|
||||
#define PHMAP_IF_CONSTEXPR(expr) if ((expr))
|
||||
|
||||
Reference in New Issue
Block a user