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
9
QT_BEGIN_NAMESPACE
10
11
namespace
QtPrivate
{
12
13
#define FOR_EACH_CVREF(op) \
14
op(&) \
15
op(const &) \
16
op(&&) \
17
op(const &&) \
18
/* end */
19
20
namespace
_testing {
21
struct
empty
{};
22
struct
final
final
{};
23
static_assert
(std::is_same_v<CompactStorage<empty>,
24
detail::StorageEmptyBaseClassOptimization<empty>
>);
25
static_assert
(std::is_same_v<CompactStorage<final>,
26
detail::StorageByValue<final>
>);
27
static_assert
(std::is_same_v<CompactStorage<int>,
28
detail::StorageByValue<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
38
FOR_EACH_CVREF
(
CHECK
)
39
#undef CHECK
40
#undef CHECK1
41
}
// namespace _testing
42
43
}
// namespace QtPrivate
44
45
#undef FOR_EACH_CVREF
46
47
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1590
QtPrivate
\macro QT_NO_KEYWORDS >
Definition
qtconcurrentcompilertest.h:13
CHECK
#define CHECK(cvref)
Definition
q23utility.cpp:14
FOR_EACH_CVREF
#define FOR_EACH_CVREF(op)
Definition
qfunctionaltools_impl.cpp:13
QtPrivate::_testing::empty
Definition
qfunctionaltools_impl.cpp:21
QtPrivate::_testing::final
Definition
qfunctionaltools_impl.cpp:22
QtPrivate::detail::StorageByValue
Definition
qfunctionaltools_impl.h:33
QtPrivate::detail::StorageEmptyBaseClassOptimization
Definition
qfunctionaltools_impl.h:44
qtbase
src
corelib
tools
qfunctionaltools_impl.cpp
Generated by
1.10.0