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>
bb10
Thiago Macieira 2014-02-27 14:00:26 -08:00 committed by The Qt Project
parent d1e2235553
commit 51f7ef800e
1 changed files with 1 additions and 1 deletions

View File

@ -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