summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-02-27 14:00:26 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-08 00:21:53 +0100
commit51f7ef800ee84f9cbc0e1f742c2d869f887bd5ed (patch)
treef75837b28dc88a4c27b3e826761cc95611a02434 /src/corelib
parentd1e2235553733876e97c2b65ef2e8d85889fa9ea (diff)
Make Q_NULLPTR be NULL on C++98
Some compilers actually have a C++11-like null pointer constant in C++98 mode: $ gcc -dM -E -include stddef.h -xc++ /dev/null | grep NULL #define NULL __null $ icc -dM -E -include stddef.h -xc++ /dev/null | grep NULL #define NULL __null $ clang -dM -E -include stddef.h -xc++ /dev/null | grep NULL #define NULL __null Change-Id: Ie0bcaf36fed6ad27e761a0a24332817129128571 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qcompilerdetection.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index 1eb442aa5f..6755b82f61 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -858,7 +858,7 @@
#ifdef Q_COMPILER_NULLPTR
# define Q_NULLPTR nullptr
#else
-# define Q_NULLPTR 0
+# define Q_NULLPTR NULL
#endif
#ifdef Q_COMPILER_DEFAULT_MEMBERS