Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qfunctionaltools_impl.cpp
Go to the documentation of this file.
1// Copyright (C) 2023 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#include <QtCore/qfunctionaltools_impl.h>
5
6// Remove this file once we have tests that implicitly test all aspects of
7// CompactStorage
8
10
11namespace QtPrivate {
12
13#define FOR_EACH_CVREF(op) \
14 op(&) \
15 op(const &) \
16 op(&&) \
17 op(const &&) \
18 /* end */
19
20namespace _testing {
21 struct empty {};
22 struct final final {};
23 static_assert(std::is_same_v<CompactStorage<empty>,
25 static_assert(std::is_same_v<CompactStorage<final>,
27 static_assert(std::is_same_v<CompactStorage<int>,
29#define CHECK1(Obj, cvref) \
30 static_assert(std::is_same_v<decltype(std::declval<CompactStorage< Obj > cvref>().object()), \
31 Obj cvref>);
32#define CHECK(cvref) \
33 CHECK1(empty, cvref) \
34 CHECK1(final, cvref) \
35 CHECK1(int, cvref) \
36 /* end */
37
39#undef CHECK
40#undef CHECK1
41} // namespace _testing
42
43} // namespace QtPrivate
44
45#undef FOR_EACH_CVREF
46
Combined button and popup list for selecting options.
\macro QT_NO_KEYWORDS >
#define CHECK(cvref)
#define FOR_EACH_CVREF(op)