Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.4.0
-
None
Description
issue: should be able to do something like:
QtConcurrent::mapped({"some", "sequence"}, PointerToMember, object);
Current ugly workaround:
namespace { template <typename Sequence, typename MapFunctionPointer, typename T> QFuture<QtPrivate::MapResultType<Sequence, std::function<QtPrivate::FunctionPointer<MapFunctionPointer>::Ret (QtPrivate::ArgumentType<T>)>>> mapped(Sequence &&sequence, MapFunctionPointer map, T* o){ auto wrapper = [o, map](const ArgumentType<T>& it){ return std::mem_fn(map)(o, it); }; return QtConcurrent::mapped(std::forward<Sequence &&>(sequence), wrapper); } }