qtbase/src/corelib/text/qtformat_impl.h
Ivan Solovev 584ac81852 Move qtformat_impl.h into corelib/text
... because it is not really related to IO.
We were choosing between serialization and text, and ended up with
text, because that's where the standard itself puts format [0].

[0]: https://eel.is/c++draft/format.functions

Amends ffac33964d51971a1c1f61308b6f0a60a4133296.

Found in Qt 6.9 API review.

Pick-to: 6.9
Change-Id: I827322175da81bc027a9e136098b7e84677f43f7
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2025-02-06 01:52:38 +01:00

31 lines
946 B
C++

// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QTFORMAT_IMPL_H
#define QTFORMAT_IMPL_H
#if 0
#pragma qt_no_master_include
#pragma qt_sync_skip_header_check
#endif
#include <QtCore/qsystemdetection.h>
#include <QtCore/qtconfigmacros.h>
// Users can disable std::format support in their
// projects by using this definition.
#if !defined(QT_NO_STD_FORMAT_SUPPORT) && defined(__cpp_lib_format) && __cpp_lib_format >= 202106L
#include <format>
// If this macro is defined, std::format support is actually available.
// Use it to provide the implementation!
// Note that any out-of-line helper function should not depend on this
// definition, as it should be unconditionally available even in C++17 builds
// to keep BC.
#define QT_SUPPORTS_STD_FORMAT 1
#endif // __cpp_lib_format && !QT_NO_STD_FORMAT_SUPPORT
#endif // QTFORMAT_IMPL_H