mercredi 28 janvier 2015

nullptr_t not defined on g++ 4.9.2

I am using C++ Rest SDK on a project in linux comipled with g++ 4.9.2 with the -std=c++11 flag set.


Internaly C++ Rest SDK checks if nullptr exists like that:



#if defined nullptr_t
#define NEEDS_NULLPTR_DEFINED 0
#else
#define NEEDS_NULLPTR_DEFINED 1
#endif
#if NEEDS_NULLPTR_DEFINED
#define nullptr NULL
#endif


This check fail on my machine leading nullptr to be defined as NULL which breaks the compilation afterwards. I am not quite sure if g++ or C++ Rest SDK is to blame for that problem.


Do you have any idea on why this nullptr_t check fails with g++ 4.9.2 and how to fix it?


Aucun commentaire:

Enregistrer un commentaire