WhenAnyResult Struct

template <typename T> struct QtFuture::WhenAnyResult

QtFuture::WhenAnyResult is used to represent the result of QtFuture::whenAny(). More...

Header: #include <WhenAnyResult>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core
Since: Qt 6.3

Public Variables

QFuture<T> future
qsizetype index

Detailed Description

The QtFuture::WhenAnyResult<T> struct is used for packaging the copy and the index of the first completed QFuture<T> in the sequence of futures packaging type T that are passed to QtFuture::whenAny().

See also QFuture and QtFuture::whenAny().

Member Variable Documentation

QFuture<T> WhenAnyResult::future

The field contains the copy of the first completed QFuture that packages type T, where T is the type packaged by the futures passed to whenAny().

See also QtFuture::whenAny().

qsizetype WhenAnyResult::index

The field contains the index of the first completed QFuture in the sequence of futures passed to whenAny(). It has type qsizetype.

See also QtFuture::whenAny().

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.