@Perdrix
The following example compiles fine just as I expected:
#include <QCoreApplication>
#include <QtConcurrent>
void func1()
{
}
class AClass
{
public:
void func2() const {}
void func3(int arg1, float arg2) const {}
void func4(QPromise<void> &promise, int arg1, float arg2) const {}
};
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QFuture<void> fut1 = QtConcurrent::run(func1);
AClass *instance(new AClass);
QFuture<void> fut2 = QtConcurrent::run(&AClass::func2, instance);
QFuture<void> fut3 = QtConcurrent::run(&AClass::func3, instance, 42, 42.0f);
QFuture<void> fut4 = QtConcurrent::run(&AClass::func4, instance, 42, 42.0f);
return a.exec();
}
gcc 13.3.0 and Qt 6.4.2 as supplied with Ubuntu 24.04 distro.