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
4#ifndef QTFORMAT_IMPL_H
5#define QTFORMAT_IMPL_H
6
7#if 0
8#pragma qt_no_master_include
9#pragma qt_sync_skip_header_check
10#endif
11
12#include <QtCore/qsystemdetection.h>
13#include <QtCore/qtconfigmacros.h>
14
15// Users can disable std::format support in their
16// projects by using this definition.
17#if !defined(QT_NO_STD_FORMAT_SUPPORT) && defined(__cpp_lib_format) && __cpp_lib_format >= 202106L
18
19#include <format>
20
21// If this macro is defined, std::format support is actually available.
22// Use it to provide the implementation!
23// Note that any out-of-line helper function should not depend on this
24// definition, as it should be unconditionally available even in C++17 builds
25// to keep BC.
26#define QT_SUPPORTS_STD_FORMAT 1
27
28#endif // __cpp_lib_format && !QT_NO_STD_FORMAT_SUPPORT
29
30#endif // QTFORMAT_IMPL_H
31

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