QtConcurrent
QtConcurrentMap
Both I have included.
Printable View
QtConcurrent
QtConcurrentMap
Both I have included.
Is what you posted a complete error message?
error: no matching function for call to 'mappedReduced'
QFuture<QString> decryptedContent = QtConcurrent::mappedReduced(fileList,DecryptMap('A '),ReduceS());
And there is nothing more? Nothing about candidates for the proper call or something like that?
The below warning are also found.
candidate template ignored: couldn't infer template argument 'ResultType'
QFuture<ResultType> mappedReduced(const Sequence &sequence,
^
candidate template ignored: deduced conflicting types for parameter 'Iterator' ('QList<QString>' vs. 'DecryptMap')
QFuture<ResultType> mappedReduced(Iterator begin,
^
candidate template ignored: deduced conflicting types for parameter 'Iterator' ('QList<QString>' vs. 'DecryptMap')
QFuture<typename QtPrivate::ReduceResultType<ReduceFunctor>::Result Type> mappedReduced(Iterator begin,
^
candidate template ignored: substitution failure [with Sequence = QList<QString>, MapFunctor = DecryptMap, ReduceFunctor = ReduceS]: implicit instantiation of undefined template 'QtPrivate::ReduceResultType<ReduceS>'
QFuture<typename QtPrivate::ReduceResultType<ReduceFunctor>::Result Type> mappedReduced(const Sequence &sequence,
~~~~~~~~~~~~~~~~ ^
So what are the exact signatures of fileList, DecryptA and ReduceS?
Code:
And what is the exact call to mappedReduced?
Code:
QFuture<QString> decryptedContent = QtConcurrent::mappedReduced(fileList,DecryptMap('A'),ReduceS());
Try:
Code:
QFuture<QString> decryptedContent = QtConcurrent::mappedReduced<QString>(fileList,DecryptMap('A'),ReduceS());
It worked.