From 334d4c7b69c0feb63744f04e1fc46a84996a481a Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 18 Jun 2024 17:06:03 +0200 Subject: [PATCH] qfloat16format.h: fix compilation You can't specialize a class using a qualified name as class-name. Open and close namespace std instead. The std:: qualification on the base class is ok, so leave it. Prevents accidental picking up of a non-std formatting struct. Amends ffac33964d51971a1c1f61308b6f0a60a4133296. Pick-to: 6.8 Task-number: QTBUG-104654 Task-number: QTBUG-126385 Change-Id: I92e1b02b0e8b8676c5750c8f9621ae262c53b946 Reviewed-by: Joerg Bornemann --- src/corelib/io/qfloat16format.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/corelib/io/qfloat16format.h b/src/corelib/io/qfloat16format.h index 2d507800b62..96b3fdab767 100644 --- a/src/corelib/io/qfloat16format.h +++ b/src/corelib/io/qfloat16format.h @@ -45,8 +45,9 @@ using QFloat16FormatterBaseType = QT_END_NAMESPACE +namespace std { template -struct std::formatter +struct formatter : std::formatter), CharT> { template @@ -56,6 +57,7 @@ struct std::formatter return std::formatter::format(FloatType(val), ctx); } }; +} // namespace std #endif // QT_SUPPORTS_STD_FORMAT