-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a46fa17
commit b1907e1
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
diff --git a/src/corelib/tools/qduplicatetracker_p.h b/src/corelib/tools/qduplicatetracker_p.h | ||
index 3cbd48c364..2ab810a84e 100644 | ||
--- a/src/corelib/tools/qduplicatetracker_p.h | ||
+++ b/src/corelib/tools/qduplicatetracker_p.h | ||
@@ -52,7 +52,7 @@ | ||
|
||
#include <qglobal.h> | ||
|
||
-#if __has_include(<memory_resource>) && __cplusplus > 201402L | ||
+#if !defined(__APPLE__) && __has_include(<memory_resource>) && __cplusplus > 201402L | ||
# include <unordered_set> | ||
# include <memory_resource> | ||
# include <qhash.h> // for the hashing helpers | ||
@@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE | ||
|
||
template <typename T, size_t Prealloc = 32> | ||
class QDuplicateTracker { | ||
-#ifdef __cpp_lib_memory_resource | ||
+#if !defined(__APPLE__) && defined __cpp_lib_memory_resource | ||
template <typename HT> | ||
struct QHasher { | ||
size_t storedSeed = QHashSeed::globalSeed(); | ||
@@ -90,7 +90,7 @@ class QDuplicateTracker { | ||
Q_DISABLE_COPY_MOVE(QDuplicateTracker); | ||
public: | ||
static constexpr inline bool uses_pmr = | ||
- #ifdef __cpp_lib_memory_resource | ||
+ #if !defined(__APPLE__) && defined __cpp_lib_memory_resource | ||
true | ||
#else | ||
false | ||
@@ -101,7 +101,7 @@ public: | ||
[[nodiscard]] bool hasSeen(const T &s) | ||
{ | ||
bool inserted; | ||
-#ifdef __cpp_lib_memory_resource | ||
+#if !defined(__APPLE__) && defined __cpp_lib_memory_resource | ||
inserted = set.insert(s).second; | ||
#else | ||
set.insert(s); | ||
@@ -113,7 +113,7 @@ public: | ||
[[nodiscard]] bool hasSeen(T &&s) | ||
{ | ||
bool inserted; | ||
-#ifdef __cpp_lib_memory_resource | ||
+#if !defined(__APPLE__) && defined __cpp_lib_memory_resource | ||
inserted = set.insert(std::move(s)).second; | ||
#else | ||
set.insert(std::move(s)); |