Add uninitialized constructor to qfloat16

Change-Id: Ifc1fa97168927dac96e749b5dcb2a0a38b158b12
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Allan Sandfeld Jensen 2020-11-17 13:04:24 +01:00
parent 3fb039ca23
commit 32f0053e5b
2 changed files with 9 additions and 0 deletions

View File

@ -72,6 +72,13 @@ QT_BEGIN_NAMESPACE
\since 5.9
*/
/*!
\fn qfloat16::qfloat16(Qt::Initialization)
\since 6.1
Constructs a qfloat16 without initializing the value.
*/
/*!
\fn bool qIsInf(qfloat16 f)
\relates qfloat16

View File

@ -43,6 +43,7 @@
#include <QtCore/qglobal.h>
#include <QtCore/qmetatype.h>
#include <QtCore/qnamespace.h>
#include <string.h>
#if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__)
@ -76,6 +77,7 @@ class qfloat16
};
public:
constexpr inline qfloat16() noexcept : b16(0) {}
explicit qfloat16(Qt::Initialization) noexcept { }
inline qfloat16(float f) noexcept;
inline operator float() const noexcept;