tst_qobject: enable some tests for narrowing

Compilers are catching up, so some #if 0 codepaths can now be
conditionally enabled.

Change-Id: Ia9e87a096bc2ae4789ab390a9170d9c1eb9690d6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Giuseppe D'Angelo 2021-03-26 14:14:18 +01:00
parent 7ae037bc82
commit 0e778b96f1

View File

@ -7314,8 +7314,10 @@ void tst_QObject::checkArgumentsForNarrowing()
FITS(ConvertingToDouble, long double);
// no compiler still implements this properly.
#if 0
// GCC and clang don't implement this properly yet:
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99625
// https://bugs.llvm.org/show_bug.cgi?id=49676
#if defined(Q_CC_MSVC) // at least since VS2017
struct ConstructibleFromInt {
/* implicit */ ConstructibleFromInt(int) {}
};
@ -7334,7 +7336,9 @@ void tst_QObject::checkArgumentsForNarrowing()
class ForwardDeclared;
FITS(ForwardDeclared, ForwardDeclared);
#if 0 // waiting for official compiler releases that implement P1957...
#if (defined(Q_CC_EXACTLY_GCC) && Q_CC_EXACTLY_GCC >= 1100) \
|| (defined(Q_CC_CLANG) && Q_CC_CLANG >= 1100) \
|| defined(Q_CC_MSVC) // at least since VS2017
{
// wg21.link/P1957
NARROWS(char*, bool);