summaryrefslogtreecommitdiffstats
path: root/src/concurrent/qtconcurrentmap.h
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2024-12-20 16:15:08 +0100
committerIvan Solovev <ivan.solovev@qt.io>2025-01-06 10:48:34 +0100
commitf73765682e7c8f1e0e78b7464deec57c7f2669ba (patch)
tree527ef66291dbb6cdce14e0f0483c8138e99dae47 /src/concurrent/qtconcurrentmap.h
parenta80d1bf2716b1ba404799d6a09003b145b73b079 (diff)
QtConcurrent: fix support for callables with deduced return type
Commit 6ebe3d0f0806069f906522dfe9b81baa3f3478de introduced extra SFINAE checks on the template conditions. However, it broke the case of using callables with deduced return type, because SFINAE does not work for such conditions and treated as a hard error instead. Fix by explicitly providing all template parameters, so that compiler could figure a better overload on its own. Only QtConcurrent::blockingMapped() seems to be affected, but add unit-tests to check all other methods as well. Fixes: QTBUG-130766 Pick-to: 6.9 6.8 6.5 Change-Id: I1ddbe712d8ce04ac96ba13841cb569d728cfb943 Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Diffstat (limited to 'src/concurrent/qtconcurrentmap.h')
-rw-r--r--src/concurrent/qtconcurrentmap.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/concurrent/qtconcurrentmap.h b/src/concurrent/qtconcurrentmap.h
index bd959f44d3c..b2fd69cdd7b 100644
--- a/src/concurrent/qtconcurrentmap.h
+++ b/src/concurrent/qtconcurrentmap.h
@@ -433,9 +433,9 @@ ResultType blockingMappedReduced(QThreadPool *pool,
| SequentialReduce))
{
QFuture<ResultType> future =
- mappedReduced<ResultType>(pool, std::forward<Sequence>(sequence),
- std::forward<MapFunctor>(map),
- std::forward<ReduceFunctor>(reduce), options);
+ mappedReduced<ResultType, Sequence, MapFunctor, ReduceFunctor>(
+ pool, std::forward<Sequence>(sequence), std::forward<MapFunctor>(map),
+ std::forward<ReduceFunctor>(reduce), options);
return future.takeResult();
}