Add the #defines for C++0x features in GCC 4.6
authorThiago Macieira <thiago@kde.org>
Tue, 12 Jul 2011 11:47:14 +0000 (13:47 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 12 Jul 2011 11:57:14 +0000 (13:57 +0200)
Merge-request: 8
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Change-Id: I9176f53bd98692c31e49d1d98f91641661a52044
Reviewed-on: http://codereview.qt.nokia.com/1522
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
src/corelib/global/qglobal.h

index 1358ea6..e8e736d 100644 (file)
@@ -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