From: Thiago Macieira Date: Tue, 12 Jul 2011 11:47:14 +0000 (+0200) Subject: Add the #defines for C++0x features in GCC 4.6 X-Git-Tag: qt-v5.0.0-alpha1~4003 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=363c710bc438f9c0c4c0e1c3eeb9cc2d9d2af5db;p=profile%2Fivi%2Fqtbase.git 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 --- diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 1358ea6..e8e736d 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