Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.0, 6.1, 6.2, 6.3
-
None
-
5
-
f2f5c7d2b7 (qt/qtbase/dev) f2f5c7d2b7 (qt/tqtc-qtbase/dev) a5fa1ee822 (qt/qtbase/6.3) a5fa1ee822 (qt/tqtc-qtbase/6.3) 8c1d506a21 (qt/qtbase/6.2) 8c1d506a21 (qt/tqtc-qtbase/6.2)
-
Team One Foundation Sprint 50
Description
The following code fails to compile:
class Sender : public QObject { Q_OBJECT signals: void testSignal(std::tuple<int, int>); }; auto future = QtFuture::connect(&obj, &Sender::testSignal);
with the following error:
../qtbase/src/corelib/thread/qfuture_impl.h:913: error: no matching function for call to ‘QFutureInterface<std::tuple<int, int> >::reportResult(std::tuple<std::tuple<int, int> >)’ ../../cmake-build/qtbase/include/QtCore/../../../../qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:360:29: required from ‘struct QtPrivate::ComputeFunctorArgumentCount<QtFuture::connect(Sender*, Signal) [with Sender = Sender; Signal = void (Sender::*)(std::tuple<int, int>); <template-parameter-1-3> = void; typename QtPrivate::ArgResolver<Callable>::AllArgs = std::tuple<int, int>]::<lambda(auto:30 ...)>, QtPrivate::List<std::tuple<int, int> > >’ ../../cmake-build/qtbase/include/QtCore/../../../../qt5/qtbase/src/corelib/kernel/qobject.h:326:19: required from ‘static typename std::enable_if<((QtPrivate::FunctionPointer<Func2>::ArgumentCount == -1) && (! is_convertible_v<Func2, const char*>)), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const QObject*, Func2, Qt::ConnectionType) [with Func1 = void (Sender::*)(std::tuple<int, int>); Func2 = QtFuture::connect(Sender*, Signal) [with Sender = Sender; Signal = void (Sender::*)(std::tuple<int, int>); <template-parameter-1-3> = void; typename QtPrivate::ArgResolver<Callable>::AllArgs = std::tuple<int, int>]::<lambda(auto:30 ...)>; typename std::enable_if<((QtPrivate::FunctionPointer<Func2>::ArgumentCount == -1) && (! is_convertible_v<Func2, const char*>)), QMetaObject::Connection>::type = QMetaObject::Connection; typename QtPrivate::FunctionPointer<Func>::Object = Sender]’ ../../cmake-build/qtbase/include/QtCore/../../../../qt5/qtbase/src/corelib/thread/qfuture_impl.h:909:46: required from ‘QFuture<typename QtPrivate::ArgResolver<Callable>::AllArgs> QtFuture::connect(Sender*, Signal) [with Sender = Sender; Signal = void (Sender::*)(std::tuple<int, int>); <template-parameter-1-3> = void; typename QtPrivate::ArgResolver<Callable>::AllArgs = std::tuple<int, int>]’ ../untitled3/mainwindow.cpp:14:62: required from here ../../cmake-build/qtbase/include/QtCore/../../../../qt5/qtbase/src/corelib/thread/qfuture_impl.h:913:51: error: no matching function for call to ‘QFutureInterface<std::tuple<int, int> >::reportResult(std::tuple<std::tuple<int, int> >)’ 913 | promise.reportResult(QtPrivate::createTuple( | ^~~~~~~
Attachments
For Gerrit Dashboard: QTBUG-100071 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
392772,7 | QtFuture::connect: fix for signals with a single std::tuple argument | dev | qt/qtbase | Status: MERGED | +2 | 0 |
393090,3 | QtFuture::connect: fix for signals with a single std::tuple argument | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
393091,2 | QtFuture::connect: fix for signals with a single std::tuple argument | 6.3 | qt/qtbase | Status: MERGED | +2 | 0 |