summaryrefslogtreecommitdiffstats
path: root/src/concurrent/qtconcurrentfilter.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/concurrent/qtconcurrentfilter.h')
-rw-r--r--src/concurrent/qtconcurrentfilter.h78
1 files changed, 49 insertions, 29 deletions
diff --git a/src/concurrent/qtconcurrentfilter.h b/src/concurrent/qtconcurrentfilter.h
index 86e9a531d2..d9fbc1b019 100644
--- a/src/concurrent/qtconcurrentfilter.h
+++ b/src/concurrent/qtconcurrentfilter.h
@@ -4,9 +4,13 @@
#ifndef QTCONCURRENT_FILTER_H
#define QTCONCURRENT_FILTER_H
+#if 0
+#pragma qt_class(QtConcurrentFilter)
+#endif
+
#include <QtConcurrent/qtconcurrent_global.h>
-#if !defined(QT_NO_CONCURRENT) || defined(Q_CLANG_QDOC)
+#if !defined(QT_NO_CONCURRENT) || defined(Q_QDOC)
#include <QtConcurrent/qtconcurrentfilterkernel.h>
#include <QtConcurrent/qtconcurrentfunctionwrappers.h>
@@ -67,13 +71,14 @@ QFuture<ResultType> filteredReduced(Sequence &&sequence,
std::forward<KeepFunctor>(keep), std::forward<ReduceFunctor>(reduce), options);
}
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
template <typename ResultType, typename Sequence, typename KeepFunctor, typename ReduceFunctor,
typename InitialValueType>
#else
template <typename ResultType, typename Sequence, typename KeepFunctor, typename ReduceFunctor,
typename InitialValueType,
- std::enable_if_t<std::is_convertible_v<InitialValueType, ResultType>, int> = 0>
+ std::enable_if_t<QtPrivate::isInitialValueCompatible_v<InitialValueType, ResultType>,
+ int> = 0>
#endif
QFuture<ResultType> filteredReduced(QThreadPool *pool,
Sequence &&sequence,
@@ -89,13 +94,14 @@ QFuture<ResultType> filteredReduced(QThreadPool *pool,
ResultType(std::forward<InitialValueType>(initialValue)), options);
}
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
template <typename ResultType, typename Sequence, typename KeepFunctor, typename ReduceFunctor,
typename InitialValueType>
#else
template <typename ResultType, typename Sequence, typename KeepFunctor, typename ReduceFunctor,
typename InitialValueType,
- std::enable_if_t<std::is_convertible_v<InitialValueType, ResultType>, int> = 0>
+ std::enable_if_t<QtPrivate::isInitialValueCompatible_v<InitialValueType, ResultType>,
+ int> = 0>
#endif
QFuture<ResultType> filteredReduced(Sequence &&sequence,
KeepFunctor &&keep,
@@ -110,7 +116,7 @@ QFuture<ResultType> filteredReduced(Sequence &&sequence,
ResultType(std::forward<InitialValueType>(initialValue)), options);
}
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template <typename Sequence, typename KeepFunctor, typename ReduceFunctor,
std::enable_if_t<QtPrivate::isInvocable<KeepFunctor, Sequence>::value, int> = 0,
typename ResultType = typename QtPrivate::ReduceResultTypeHelper<ReduceFunctor>::type>
@@ -144,7 +150,8 @@ template <typename Sequence, typename KeepFunctor, typename ReduceFunctor,
typename InitialValueType,
std::enable_if_t<QtPrivate::isInvocable<KeepFunctor, Sequence>::value, int> = 0,
typename ResultType = typename QtPrivate::ReduceResultTypeHelper<ReduceFunctor>::type,
- std::enable_if_t<std::is_convertible_v<InitialValueType, ResultType>, int> = 0>
+ std::enable_if_t<QtPrivate::isInitialValueCompatible_v<InitialValueType, ResultType>,
+ int> = 0>
QFuture<ResultType> filteredReduced(QThreadPool *pool,
Sequence &&sequence,
KeepFunctor &&keep,
@@ -163,7 +170,8 @@ template <typename Sequence, typename KeepFunctor, typename ReduceFunctor,
typename InitialValueType,
std::enable_if_t<QtPrivate::isInvocable<KeepFunctor, Sequence>::value, int> = 0,
typename ResultType = typename QtPrivate::ReduceResultTypeHelper<ReduceFunctor>::type,
- std::enable_if_t<std::is_convertible_v<InitialValueType, ResultType>, int> = 0>
+ std::enable_if_t<QtPrivate::isInitialValueCompatible_v<InitialValueType, ResultType>,
+ int> = 0>
QFuture<ResultType> filteredReduced(Sequence &&sequence,
KeepFunctor &&keep,
ReduceFunctor &&reduce,
@@ -205,13 +213,14 @@ QFuture<ResultType> filteredReduced(Iterator begin,
std::forward<ReduceFunctor>(reduce), options);
}
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
template <typename ResultType, typename Iterator, typename KeepFunctor, typename ReduceFunctor,
typename InitialValueType>
#else
template <typename ResultType, typename Iterator, typename KeepFunctor, typename ReduceFunctor,
typename InitialValueType,
- std::enable_if_t<std::is_convertible_v<InitialValueType, ResultType>, int> = 0>
+ std::enable_if_t<QtPrivate::isInitialValueCompatible_v<InitialValueType, ResultType>,
+ int> = 0>
#endif
QFuture<ResultType> filteredReduced(QThreadPool *pool,
Iterator begin,
@@ -227,13 +236,14 @@ QFuture<ResultType> filteredReduced(QThreadPool *pool,
ResultType(std::forward<InitialValueType>(initialValue)), options);
}
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
template <typename ResultType, typename Iterator, typename KeepFunctor, typename ReduceFunctor,
typename InitialValueType>
#else
template <typename ResultType, typename Iterator, typename KeepFunctor, typename ReduceFunctor,
typename InitialValueType,
- std::enable_if_t<std::is_convertible_v<InitialValueType, ResultType>, int> = 0>
+ std::enable_if_t<QtPrivate::isInitialValueCompatible_v<InitialValueType, ResultType>,
+ int> = 0>
#endif
QFuture<ResultType> filteredReduced(Iterator begin,
Iterator end,
@@ -249,7 +259,7 @@ QFuture<ResultType> filteredReduced(Iterator begin,
ResultType(std::forward<InitialValueType>(initialValue)), options);
}
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template <typename Iterator, typename KeepFunctor, typename ReduceFunctor,
typename ResultType = typename QtPrivate::ReduceResultTypeHelper<ReduceFunctor>::type>
QFuture<ResultType> filteredReduced(QThreadPool *pool,
@@ -281,7 +291,8 @@ QFuture<ResultType> filteredReduced(Iterator begin,
template <typename Iterator, typename KeepFunctor, typename ReduceFunctor,
typename ResultType = typename QtPrivate::ReduceResultTypeHelper<ReduceFunctor>::type,
typename InitialValueType,
- std::enable_if_t<std::is_convertible_v<InitialValueType, ResultType>, int> = 0>
+ std::enable_if_t<QtPrivate::isInitialValueCompatible_v<InitialValueType, ResultType>,
+ int> = 0>
QFuture<ResultType> filteredReduced(QThreadPool *pool,
Iterator begin,
Iterator end,
@@ -300,7 +311,8 @@ template <typename Iterator, typename KeepFunctor, typename ReduceFunctor,
std::enable_if_t<QtPrivate::isIterator_v<Iterator>, int> = 0,
typename ResultType = typename QtPrivate::ReduceResultTypeHelper<ReduceFunctor>::type,
typename InitialValueType,
- std::enable_if_t<std::is_convertible_v<InitialValueType, ResultType>, int> = 0>
+ std::enable_if_t<QtPrivate::isInitialValueCompatible_v<InitialValueType, ResultType>,
+ int> = 0>
QFuture<ResultType> filteredReduced(Iterator begin,
Iterator end,
KeepFunctor &&keep,
@@ -394,13 +406,14 @@ ResultType blockingFilteredReduced(Sequence &&sequence,
return future.takeResult();
}
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
template <typename ResultType, typename Sequence, typename KeepFunctor, typename ReduceFunctor,
typename InitialValueType>
#else
template <typename ResultType, typename Sequence, typename KeepFunctor, typename ReduceFunctor,
typename InitialValueType,
- std::enable_if_t<std::is_convertible_v<InitialValueType, ResultType>, int> = 0>
+ std::enable_if_t<QtPrivate::isInitialValueCompatible_v<InitialValueType, ResultType>,
+ int> = 0>
#endif
ResultType blockingFilteredReduced(QThreadPool *pool,
Sequence &&sequence,
@@ -417,13 +430,14 @@ ResultType blockingFilteredReduced(QThreadPool *pool,
return future.takeResult();
}
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
template <typename ResultType, typename Sequence, typename KeepFunctor, typename ReduceFunctor,
typename InitialValueType>
#else
template <typename ResultType, typename Sequence, typename KeepFunctor, typename ReduceFunctor,
typename InitialValueType,
- std::enable_if_t<std::is_convertible_v<InitialValueType, ResultType>, int> = 0>
+ std::enable_if_t<QtPrivate::isInitialValueCompatible_v<InitialValueType, ResultType>,
+ int> = 0>
#endif
ResultType blockingFilteredReduced(Sequence &&sequence,
KeepFunctor &&keep,
@@ -439,7 +453,7 @@ ResultType blockingFilteredReduced(Sequence &&sequence,
return future.takeResult();
}
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template <typename Sequence, typename KeepFunctor, typename ReduceFunctor,
std::enable_if_t<QtPrivate::isInvocable<KeepFunctor, Sequence>::value, int> = 0,
typename ResultType = typename QtPrivate::ReduceResultTypeHelper<ReduceFunctor>::type>
@@ -475,7 +489,8 @@ template <typename Sequence, typename KeepFunctor, typename ReduceFunctor,
typename InitialValueType,
std::enable_if_t<QtPrivate::isInvocable<KeepFunctor, Sequence>::value, int> = 0,
typename ResultType = typename QtPrivate::ReduceResultTypeHelper<ReduceFunctor>::type,
- std::enable_if_t<std::is_convertible_v<InitialValueType, ResultType>, int> = 0>
+ std::enable_if_t<QtPrivate::isInitialValueCompatible_v<InitialValueType, ResultType>,
+ int> = 0>
ResultType blockingFilteredReduced(QThreadPool *pool,
Sequence &&sequence,
KeepFunctor &&keep,
@@ -495,7 +510,8 @@ template <typename Sequence, typename KeepFunctor, typename ReduceFunctor,
typename InitialValueType,
std::enable_if_t<QtPrivate::isInvocable<KeepFunctor, Sequence>::value, int> = 0,
typename ResultType = typename QtPrivate::ReduceResultTypeHelper<ReduceFunctor>::type,
- std::enable_if_t<std::is_convertible_v<InitialValueType, ResultType>, int> = 0>
+ std::enable_if_t<QtPrivate::isInitialValueCompatible_v<InitialValueType, ResultType>,
+ int> = 0>
ResultType blockingFilteredReduced(Sequence &&sequence,
KeepFunctor &&keep,
ReduceFunctor &&reduce,
@@ -541,13 +557,14 @@ ResultType blockingFilteredReduced(Iterator begin,
return future.takeResult();
}
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
template <typename ResultType, typename Iterator, typename KeepFunctor, typename ReduceFunctor,
typename InitialValueType>
#else
template <typename ResultType, typename Iterator, typename KeepFunctor, typename ReduceFunctor,
typename InitialValueType,
- std::enable_if_t<std::is_convertible_v<InitialValueType, ResultType>, int> = 0>
+ std::enable_if_t<QtPrivate::isInitialValueCompatible_v<InitialValueType, ResultType>,
+ int> = 0>
#endif
ResultType blockingFilteredReduced(QThreadPool *pool,
Iterator begin,
@@ -564,13 +581,14 @@ ResultType blockingFilteredReduced(QThreadPool *pool,
return future.takeResult();
}
-#ifdef Q_CLANG_QDOC
+#ifdef Q_QDOC
template <typename ResultType, typename Iterator, typename KeepFunctor, typename ReduceFunctor,
typename InitialValueType>
#else
template <typename ResultType, typename Iterator, typename KeepFunctor, typename ReduceFunctor,
typename InitialValueType,
- std::enable_if_t<std::is_convertible_v<InitialValueType, ResultType>, int> = 0>
+ std::enable_if_t<QtPrivate::isInitialValueCompatible_v<InitialValueType, ResultType>,
+ int> = 0>
#endif
ResultType blockingFilteredReduced(Iterator begin,
Iterator end,
@@ -586,7 +604,7 @@ ResultType blockingFilteredReduced(Iterator begin,
return future.takeResult();
}
-#ifndef Q_CLANG_QDOC
+#ifndef Q_QDOC
template <typename Iterator, typename KeepFunctor, typename ReduceFunctor,
typename ResultType = typename QtPrivate::ReduceResultTypeHelper<ReduceFunctor>::type>
ResultType blockingFilteredReduced(QThreadPool *pool,
@@ -621,7 +639,8 @@ ResultType blockingFilteredReduced(Iterator begin,
template <typename Iterator, typename KeepFunctor, typename ReduceFunctor,
typename ResultType = typename QtPrivate::ReduceResultTypeHelper<ReduceFunctor>::type,
typename InitialValueType,
- std::enable_if_t<std::is_convertible_v<InitialValueType, ResultType>, int> = 0>
+ std::enable_if_t<QtPrivate::isInitialValueCompatible_v<InitialValueType, ResultType>,
+ int> = 0>
ResultType blockingFilteredReduced(QThreadPool *pool,
Iterator begin,
Iterator end, KeepFunctor &&keep,
@@ -640,7 +659,8 @@ template <typename Iterator, typename KeepFunctor, typename ReduceFunctor,
std::enable_if_t<QtPrivate::isIterator_v<Iterator>, int> = 0,
typename ResultType = typename QtPrivate::ReduceResultTypeHelper<ReduceFunctor>::type,
typename InitialValueType,
- std::enable_if_t<std::is_convertible_v<InitialValueType, ResultType>, int> = 0>
+ std::enable_if_t<QtPrivate::isInitialValueCompatible_v<InitialValueType, ResultType>,
+ int> = 0>
ResultType blockingFilteredReduced(Iterator begin,
Iterator end,
KeepFunctor &&keep,