cmake: Remove useless NULL_IS_NULLPTR_T check

floating-point
Nicolas Hake 2010-09-29 23:14:08 +02:00
parent 8b1838b3e7
commit bfd803bd54
3 changed files with 1 additions and 8 deletions

View File

@ -79,10 +79,6 @@ set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_FLAGS ${OC_REQUIRED_FLAGS})
CHECK_CXX_SOURCE_COMPILES("void f(struct D&&); int main() { return 0; }" HAVE_RVALUE_REF)
CHECK_CXX_SOURCE_COMPILES("int main() { void *d = nullptr; }" HAVE_NULLPTR)
if(HAVE_NULLPTR)
CHECK_CXX_SOURCE_COMPILES("#include <cstddef>
template<class T> void f(T &&); template<> void f(std::nullptr_t &&) {} int main() { f(NULL); }" NULL_IS_NULLPTR_T)
endif()
set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
if(MSVC_VERSION GREATER 1499)

View File

@ -191,6 +191,3 @@
/* Define to 1 if you have support for nullptr. */
#cmakedefine HAVE_NULLPTR 1
/* Define to 1 if your NULL is an instance of std::nullptr_t. */
#cmakedefine NULL_IS_NULLPTR_T 1

View File

@ -93,7 +93,7 @@ inline void operator delete(void *p, const char *, long)
// C++0x nullptr
#if defined(HAVE_NULLPTR) && !defined(NULL_IS_NULLPTR_T)
#ifdef HAVE_NULLPTR
#undef NULL
#define NULL nullptr
#endif