Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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
// Qt-Security score:significant reason:default
4
5
#
include
<
QtCore
/
qfunctionaltools_impl
.
h
>
6
7
// Remove this file once we have tests that implicitly test all aspects of
8
// CompactStorage
9
10
QT_BEGIN_NAMESPACE
11
12
namespace
QtPrivate
{
13
14
#
define
FOR_EACH_CVREF
(
op
)
15
op
(
&
)
16
op
(
const
&
)
17
op
(
&&
)
18
op
(
const
&&
)
19
/* end */
20
21
namespace
_testing
{
22
struct
empty
{};
23
struct
final
final
{};
24
static_assert
(
std
::
is_same_v
<
CompactStorage
<
empty
>,
25
detail
::
StorageEmptyBaseClassOptimization
<
empty
>>);
26
static_assert
(
std
::
is_same_v
<
CompactStorage
<
final
>,
27
detail
::
StorageByValue
<
final
>>);
28
static_assert
(
std
::
is_same_v
<
CompactStorage
<
int
>,
29
detail
::
StorageByValue
<
int
>>);
30
#
define
CHECK1
(
Obj
,
cvref
)
31
static_assert
(
std
::
is_same_v
<
decltype
(
std
::
declval
<
CompactStorage
<
Obj
>
cvref
>
(
)
.
object
(
)
)
,
32
Obj
cvref
>
)
;
33
#
define
CHECK
(
cvref
)
34
CHECK1
(
empty
,
cvref
)
35
CHECK1
(
final
,
cvref
)
36
CHECK1
(
int
,
cvref
)
37
/* end */
38
39
FOR_EACH_CVREF
(
CHECK
)
40
#
undef
CHECK
41
#
undef
CHECK1
42
}
// namespace _testing
43
44
}
// namespace QtPrivate
45
46
#
undef
FOR_EACH_CVREF
47
48
QT_END_NAMESPACE
QtPrivate::_testing
Definition
qfunctionaltools_impl.cpp:21
QtPrivate
Definition
qalloc.h:28
FOR_EACH_CVREF
#define FOR_EACH_CVREF(op)
Definition
qfunctionaltools_impl.cpp:14
QtPrivate::_testing::empty
Definition
qfunctionaltools_impl.cpp:22
QtPrivate::_testing::final
Definition
qfunctionaltools_impl.cpp:23
qtbase
src
corelib
tools
qfunctionaltools_impl.cpp
Generated on
for Qt by
1.16.1