summaryrefslogtreecommitdiffstats
path: root/src/concurrent/qtconcurrentmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/concurrent/qtconcurrentmap.cpp')
-rw-r--r--src/concurrent/qtconcurrentmap.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/concurrent/qtconcurrentmap.cpp b/src/concurrent/qtconcurrentmap.cpp
index 884bf4b4f9a..1ba5de355b0 100644
--- a/src/concurrent/qtconcurrentmap.cpp
+++ b/src/concurrent/qtconcurrentmap.cpp
@@ -192,12 +192,19 @@
\section2 Using Function Objects
QtConcurrent::map(), QtConcurrent::mapped(), and
- QtConcurrent::mappedReduced() accept function objects, which can be used to
+ QtConcurrent::mappedReduced() accept function objects
+ for the map function. These function objects can be used to
add state to a function call. The result_type typedef must define the
result type of the function call operator:
\snippet code/src_concurrent_qtconcurrentmap.cpp 14
+ For the reduce function, function objects are not directly
+ supported. Function objects can, however, be used
+ when the type of the reduction result is explicitly specified:
+
+ \snippet code/src_concurrent_qtconcurrentmap.cpp 11
+
\section2 Wrapping Functions that Take Multiple Arguments
If you want to use a map function that takes more than one argument you can