summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qcompilerdetection.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-04-24 12:57:25 -0700
committerThiago Macieira <thiago.macieira@intel.com>2016-04-28 02:45:40 +0000
commit3430552881ccd75b4f00c62014b7fa810c998002 (patch)
tree41532c6598684681ce1faefbdb50ebc789beb820 /src/corelib/global/qcompilerdetection.h
parentef7b0df4192b390c70a5e848bbe7c397daaefcce (diff)
Use C++11 alignas() for Q_DECL_ALIGN, if possible
Change-Id: Ifea6e497f11a461db432ffff144863d4ed69a212 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/corelib/global/qcompilerdetection.h')
-rw-r--r--src/corelib/global/qcompilerdetection.h5
1 files changed, 5 insertions, 0 deletions
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
*/