From 3430552881ccd75b4f00c62014b7fa810c998002 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 24 Apr 2016 12:57:25 -0700 Subject: Use C++11 alignas() for Q_DECL_ALIGN, if possible Change-Id: Ifea6e497f11a461db432ffff144863d4ed69a212 Reviewed-by: Marc Mutz --- src/corelib/global/qcompilerdetection.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 25043dab75..8574059616 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -1055,6 +1055,11 @@ # define Q_ALIGNOF(x) alignof(x) #endif +#if defined(Q_COMPILER_ALIGNAS) +# undef Q_DECL_ALIGN +# define Q_DECL_ALIGN(n) alignas(n) +#endif + /* * Fallback macros to certain compiler features */ -- cgit v1.2.3