1// Copyright (C) 2022 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/qglobal.h>
5
6#ifndef QSTRINGFWD_H
7#define QSTRINGFWD_H
8
9QT_BEGIN_NAMESPACE
10
11#if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0)
12# define QT_BEGIN_HAS_CHAR8_T_NAMESPACE inline namespace q_has_char8_t {
13# define QT_BEGIN_NO_CHAR8_T_NAMESPACE namespace q_no_char8_t {
14#else
15# define QT_BEGIN_HAS_CHAR8_T_NAMESPACE namespace q_has_char8_t {
16# define QT_BEGIN_NO_CHAR8_T_NAMESPACE inline namespace q_no_char8_t {
17#endif
18#define QT_END_HAS_CHAR8_T_NAMESPACE }
19#define QT_END_NO_CHAR8_T_NAMESPACE }
20
21// declare namespaces:
22QT_BEGIN_HAS_CHAR8_T_NAMESPACE
23QT_END_HAS_CHAR8_T_NAMESPACE
24QT_BEGIN_NO_CHAR8_T_NAMESPACE
25QT_END_NO_CHAR8_T_NAMESPACE
26
27class QByteArray;
28class QByteArrayView;
29#if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0) || defined(QT_BOOTSTRAPPED) || defined(Q_QDOC)
30class QLatin1StringView;
31using QLatin1String = QLatin1StringView;
32#else
33class QLatin1String;
34using QLatin1StringView = QLatin1String;
35#endif
36class QStringView;
37template <bool> class QBasicUtf8StringView;
38class QAnyStringView;
39class QChar;
40class QRegularExpression;
41class QRegularExpressionMatch;
42
43#ifndef Q_QDOC
44// ### Qt 7: remove the non-char8_t version of QUtf8StringView
45QT_BEGIN_NO_CHAR8_T_NAMESPACE
46using QUtf8StringView = QBasicUtf8StringView<false>;
47QT_END_NO_CHAR8_T_NAMESPACE
48
49QT_BEGIN_HAS_CHAR8_T_NAMESPACE
50using QUtf8StringView = QBasicUtf8StringView<true>;
51QT_END_HAS_CHAR8_T_NAMESPACE
52#endif // Q_QDOC
53
54QT_END_NAMESPACE
55
56#endif // QSTRINGFWD_H
57

source code of qtbase/src/corelib/text/qstringfwd.h