Using g++ with C++ Rest SDK redefines nullptr as NULL even if nullptr is available.
In file include/cpprest/details/SafeInt3.hpp the following code is used to check if nullptr is available:
```
#if defined nullptr_t
#define NEEDS_NULLPTR_DEFINED 0
#else
#define NEEDS_NULLPTR_DEFINED 1
#endif
...
#if NEEDS_NULLPTR_DEFINED
#define nullptr NULL
#endif
```
However this is not a valid check (nullptr_t is a type so #if defined nullptr_t always evaluate to false leading to NEEDS_NULLPTR_DEFINED always beeing defined to 1).
Trying to change
```
#if defined nullptr_t
```
to
```
#if __cplusplus >= 201103L
```
which seems to be a more valid check breaks compilation (c.f. build_output.txt) of C++ REST SDK on my machine (using g++ 4.9.2 and boost 1.57.0).
Comments: Hi, I added _add_definitions(-DNEEDS_NULLPTR_DEFINED=0)_ to CMakeList.txt of the Release directory but the compilation still break (c.f. new build_output.txt). As stated on [stackoverflow](http://stackoverflow.com/questions/28199162/nullptr-t-not-defined-on-g-4-9-2) This seems to be caused by boost::function that cannot handle nullptr: [svn.boost.org/trac/boost/ticket/10981](svn.boost.org/trac/boost/ticket/10981) Best regards, Simon
In file include/cpprest/details/SafeInt3.hpp the following code is used to check if nullptr is available:
```
#if defined nullptr_t
#define NEEDS_NULLPTR_DEFINED 0
#else
#define NEEDS_NULLPTR_DEFINED 1
#endif
...
#if NEEDS_NULLPTR_DEFINED
#define nullptr NULL
#endif
```
However this is not a valid check (nullptr_t is a type so #if defined nullptr_t always evaluate to false leading to NEEDS_NULLPTR_DEFINED always beeing defined to 1).
Trying to change
```
#if defined nullptr_t
```
to
```
#if __cplusplus >= 201103L
```
which seems to be a more valid check breaks compilation (c.f. build_output.txt) of C++ REST SDK on my machine (using g++ 4.9.2 and boost 1.57.0).
Comments: Hi, I added _add_definitions(-DNEEDS_NULLPTR_DEFINED=0)_ to CMakeList.txt of the Release directory but the compilation still break (c.f. new build_output.txt). As stated on [stackoverflow](http://stackoverflow.com/questions/28199162/nullptr-t-not-defined-on-g-4-9-2) This seems to be caused by boost::function that cannot handle nullptr: [svn.boost.org/trac/boost/ticket/10981](svn.boost.org/trac/boost/ticket/10981) Best regards, Simon