Details
-
User Story
-
Resolution: Done
-
P2: Important
-
5.12.0
-
None
-
-
13
-
Qt6_Foundation_ Sprint 4
-
d57adfe5f375121c3e233465526ee5d9df03e1e9
Description
When using map-reduce or filter-reduce, it is sometimes desirable to provide an initial state for the output object (i.e. the object to which the reduce step will be applied). This may be because the desired output object has no default constructor, or because the default constructor produces an initial state which is not appropriate for the operation.
Although it is possible to work around this by binding the object to a stateful reduce functor, this can be awkward since it requires the reduce functor to take a dummy parameter, and the actual result is no longer returned from the QtConcurrent call. It would be much more convenient if QtConcurrent simply accepted an initial state.
Attachments
For Gerrit Dashboard: QTBUG-73240 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
292125,7 | QtConcurrent: filter- and map-reduce with initial value | dev | qt/qtbase | Status: MERGED | +2 | 0 |