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
qcompare.cpp
Go to the documentation of this file.
1// Copyright (C) 2020 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2// Copyright (C) 2023 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#include "qcompare.h"
6
7#ifdef __cpp_lib_bit_cast
8#include <bit>
9#endif
10
12
13#ifdef __cpp_lib_three_way_comparison
14#ifdef __cpp_lib_bit_cast
15#define CHECK(type, flag) \
16 static_assert(std::bit_cast<Qt:: type ## _ordering>(std:: type ## _ordering:: flag) \
17 == Qt:: type ## _ordering :: flag); \
18 static_assert(std::bit_cast<std:: type ## _ordering>(Qt:: type ## _ordering:: flag) \
19 == std:: type ## _ordering :: flag) \
20 /* end */
21CHECK(partial, unordered);
22CHECK(partial, less);
23CHECK(partial, greater);
24CHECK(partial, equivalent);
25CHECK(weak, less);
26CHECK(weak, greater);
27CHECK(weak, equivalent);
28CHECK(strong, less);
29CHECK(strong, greater);
31CHECK(strong, equivalent);
32#undef CHECK
33#endif // __cpp_lib_bit_cast
34#endif //__cpp_lib_three_way_comparison
35
36
291
302
Combined button and popup list for selecting options.
#define CHECK(cvref)
static bool equal(const QChar *a, int l, const char *b)
Definition qurlidna.cpp:338
QSharedPointer< int > strong