Jeffrey Walton wrote: > Then you have Apple's version of Clang. They are probably C++03 for > compatibility reasons for Xcode developers. So even if LLVM moved to > C++11, Apple's Clang may stay at C++03.
Ah, that explains the nullptr issue with this compiler, and also why we have to test __apple_build_version__ (or __APPLE_CC__) in a couple of places. > > I don't know how to proceed here. C++ is such a waste of time!! > > In the projects I work on, I use a library specific define. In > Gnulib's case, it would be GNULIB_NULLPTR. Then I have a feature test > to set GNULIB_NULLPTR to either nullptr or NULL. The strategy works > well for me. > > #if defined(HAVE_CXX11_NULLPTR) > # define GNULIB_NULLPTR nullptr > #else > # define GNULIB_NULLPTR NULL > #endif In Gnulib, we started with this coding style many years ago. Then switched to the today's style where the programmer can use exactly the identifiers from the relevant standards (POSIX, ISO C, ISO C++), without some 'gnulib_' or 'gl_' prefixes in most of the cases. Bruno