diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-02-09 10:45:48 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-03-14 15:55:12 +0100 |
commit | 67385c04ce272cf553bc2e8aa8e923cd7851fc66 (patch) | |
tree | 6fbe4250ed28787282cb1c9a1cc04e555fcd084b /src/corelib/global/qfloat16.h | |
parent | 06c2ffdae7aecc912b4541a4049ab6aab49cab65 (diff) |
QDataStream: make qfloat16 streaming a non-member
Remove the member function from the API and re-add it as a hidden
friend on qfloat16, where it will be a complete type.
[ChangeLog][QtCore][Potentially Souce-Incompatible Changes] The
qfloat16 QDataStream operators are now hidden friends and only found
by argument-dependent lookup. Previously, these were member functions
on QDataStream.
Fixes: QTBUG-93499
Pick-to: 6.3
Change-Id: Ib3d4df7a3fe3a9d0938f3be8b70b50fef0416262
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/global/qfloat16.h')
-rw-r--r-- | src/corelib/global/qfloat16.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h index 8361dd8764..d9fd89215d 100644 --- a/src/corelib/global/qfloat16.h +++ b/src/corelib/global/qfloat16.h @@ -67,6 +67,10 @@ QT_BEGIN_NAMESPACE #pragma qt_no_master_include #endif +#ifndef QT_NO_DATASTREAM +class QDataStream; +#endif + class qfloat16 { struct Wrap @@ -200,6 +204,11 @@ QT_WARNING_DISABLE_FLOAT_COMPARE #undef QF16_MAKE_BOOL_OP_INT QT_WARNING_POP + +#ifndef QT_NO_DATASTREAM + friend Q_CORE_EXPORT QDataStream &operator<<(QDataStream &ds, qfloat16 f); + friend Q_CORE_EXPORT QDataStream &operator>>(QDataStream &ds, qfloat16 &f); +#endif }; Q_DECLARE_TYPEINFO(qfloat16, Q_PRIMITIVE_TYPE); |