From 226a60baf50c9c91a98c01c3dd9c0ced750f8d0e Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 21 Oct 2019 15:19:18 +0200 Subject: Replace Q_ALIGNOF usage in qtbase with C++11 alignof keyword The macro is not documented, so not part of the public Qt API. It is made obsolete by the alignof keyword in C++11. Remove the usage of the macro across qtbase, in particular the workarounds for compilers that didn't support alignof, and that will not be supported in Qt 6. The macro definition is left in place, no need to break existing code. Task-number: QTBUG-76414 Change-Id: I1cfedcd4dd748128696cdfb546d97aae4f98c3da Reviewed-by: Allan Sandfeld Jensen --- tests/auto/other/compiler/tst_compiler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/other') diff --git a/tests/auto/other/compiler/tst_compiler.cpp b/tests/auto/other/compiler/tst_compiler.cpp index de15f4c62d..78026665be 100644 --- a/tests/auto/other/compiler/tst_compiler.cpp +++ b/tests/auto/other/compiler/tst_compiler.cpp @@ -634,7 +634,7 @@ void tst_Compiler::cxx11_alignas() struct S { alignas(double) char c; }; - QCOMPARE(Q_ALIGNOF(S), Q_ALIGNOF(double)); + QCOMPARE(alignof(S), alignof(double)); #endif } @@ -1396,7 +1396,7 @@ void tst_Compiler::cxx11_unrestricted_unions() ~U() {} }; U u; - std::aligned_storage as; + std::aligned_storage as; Q_UNUSED(u); Q_UNUSED(as); -- cgit v1.2.3