From 363c710bc438f9c0c4c0e1c3eeb9cc2d9d2af5db Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 12 Jul 2011 13:47:14 +0200 Subject: Add the #defines for C++0x features in GCC 4.6 Merge-request: 8 Reviewed-by: Olivier Goffart Change-Id: I9176f53bd98692c31e49d1d98f91641661a52044 Reviewed-on: http://codereview.qt.nokia.com/1522 Reviewed-by: Qt Sanity Bot Reviewed-by: Olivier Goffart --- src/corelib/global/qglobal.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/corelib') diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 1358ea62df..e8e736d4f3 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -549,6 +549,7 @@ namespace QT_NAMESPACE {} # define Q_COMPILER_DEFAULT_DELETE_MEMBERS # define Q_COMPILER_CLASS_ENUM # define Q_COMPILER_INITIALIZER_LISTS +# define Q_COMPILER_ATOMICS # endif # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 /* C++0x features supported in GCC 4.5: */ @@ -556,7 +557,10 @@ namespace QT_NAMESPACE {} # endif # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 /* C++0x features supported in GCC 4.6: */ +# define Q_COMPILER_NULLPTR # define Q_COMPILER_CONSTEXPR +# define Q_COMPILER_UNRESTRICTED_UNIONS +# define Q_COMPILER_RANGE_FOR # endif # endif @@ -1129,6 +1133,12 @@ redefine to built-in booleans to make autotests work properly */ # define QT_FASTCALL #endif +#ifdef Q_COMPILER_NULLPTR +# define Q_NULLPTR nullptr +#else +# define Q_NULLPTR 0 +#endif + #ifdef Q_COMPILER_CONSTEXPR # define Q_DECL_CONSTEXPR constexpr #else -- cgit v1.2.3