Unsolved QtConcurrent::Mapped returns QFuture<void>
-
I have a QList<T*> and my map functions takes T* and returns an object of U type, I don't understand why when calling QtConcurrent::Mapped returns QFuture<void> shouldn't it return QFuture<U>?. How is the return type of QtConcurrent::Mapped decided?
-
@DrZod Please show how you call QtConcurrent::mapped
-
QList<T*> list = .... auto mapFunction = [std::biset<10U> bitset](const T* t)->U {return t->someFunction(bitset);} //someFunction() return U QFuture<U> futures = QtConcurrent::mapped(list,mapFunction)
-
@DrZod But how do you know that it returns QFuture<void>?
-
Because the code doesn't compile. I am using MSVC and the error message says that there is no conversion from QFuture<void> to QFuture<U>.
-
Can you test it temporary with a static function and /or const ref instead pointer? What MSVC compiler do you use?