Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-01-07 10:15:53

0001 // Copyright (C) 2020 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 // Qt-Security score:significant reason:default
0004 
0005 #ifndef QTCONCURRENTTASK_H
0006 #define QTCONCURRENTTASK_H
0007 
0008 #if !defined(QT_NO_CONCURRENT)
0009 
0010 #include <QtConcurrent/qtaskbuilder.h>
0011 
0012 QT_BEGIN_NAMESPACE
0013 
0014 #ifdef Q_QDOC
0015 
0016 namespace QtConcurrent {
0017 
0018 template <class Task>
0019 [[nodiscard]]
0020 QTaskBuilder<Task> task(Task &&task);
0021 
0022 } // namespace QtConcurrent
0023 
0024 #else
0025 
0026 namespace QtConcurrent {
0027 
0028 template <class Task>
0029 [[nodiscard]]
0030 constexpr auto task(Task &&t) { return QTaskBuilder(std::forward<Task>(t)); }
0031 
0032 } // namespace QtConcurrent
0033 
0034 #endif // Q_QDOC
0035 
0036 QT_END_NAMESPACE
0037 
0038 #endif // !defined(QT_NO_CONCURRENT)
0039 
0040 #endif // QTCONCURRENTTASK_H