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
q23type_traits.h
Go to the documentation of this file.
1
// Copyright (C) 2024 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
#
ifndef
Q23TYPE_TRAITS_H
5
#
define
Q23TYPE_TRAITS_H
6
7
#
include
<
QtCore
/
q20type_traits
.
h
>
8
9
//
10
// W A R N I N G
11
// -------------
12
//
13
// This file is not part of the Qt API. Types and functions defined in this
14
// file can reliably be replaced by their std counterparts, once available.
15
// You may use these definitions in your own code, but be aware that we
16
// will remove them once Qt depends on the C++ version that supports
17
// them in namespace std. There will be NO deprecation warning, the
18
// definitions will JUST go away.
19
//
20
// If you can't agree to these terms, don't use these definitions!
21
//
22
// We mean it.
23
//
24
25
QT_BEGIN_NAMESPACE
26
27
namespace
q23
{
28
// like std::is_scoped_enum
29
#
ifdef
__cpp_lib_is_scoped_enum
30
using
std
::
is_scoped_enum
;
31
using
std
::
is_scoped_enum_v
;
32
#
else
33
34
template
<
typename
E
,
bool
isEnum
=
std
::
is_enum_v
<
E
>>
35
struct
is_scoped_enum
:
std
::
negation
<
std
::
is_convertible
<
E
,
std
::
underlying_type_t
<
E
>>>
36
{};
37
38
template
<
typename
T>
39
struct
is_scoped_enum
<
T
,
false
> :
std
::
false_type
40
{};
41
42
template
<
typename
E
>
43
inline
constexpr
bool
is_scoped_enum_v
=
is_scoped_enum
<
E
>::
value
;
44
#
endif
// __cpp_lib_is_scoped_enum
45
}
46
47
QT_END_NAMESPACE
48
49
#
endif
/* Q23TYPE_TRAITS_H */
q23
Definition
q23functional.h:28
q23::is_scoped_enum_v
constexpr bool is_scoped_enum_v
Definition
q23type_traits.h:43
q23::is_scoped_enum< T, false >
Definition
q23type_traits.h:40
qtbase
src
corelib
global
q23type_traits.h
Generated on
for Qt by
1.16.1