1 | // Copyright (C) 2016 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QPAIR_H |
5 | #define QPAIR_H |
6 | |
7 | #include <QtCore/qglobal.h> |
8 | |
9 | QT_BEGIN_NAMESPACE |
10 | |
11 | #if 0 |
12 | #pragma qt_class(QPair) |
13 | #endif |
14 | |
15 | template <typename T1, typename T2> |
16 | using QPair = std::pair<T1, T2>; |
17 | |
18 | template <typename T1, typename T2> |
19 | constexpr decltype(auto) qMakePair(T1 &&value1, T2 &&value2) |
20 | noexcept(noexcept(std::make_pair(std::forward<T1>(value1), std::forward<T2>(value2)))) |
21 | { |
22 | return std::make_pair(std::forward<T1>(value1), std::forward<T2>(value2)); |
23 | } |
24 | |
25 | QT_END_NAMESPACE |
26 | |
27 | #endif // QPAIR_H |
28 | |