8 #ifndef IMPKERNEL_NULLPTR_H
9 #define IMPKERNEL_NULLPTR_H
11 #include <IMP/kernel_config.h>
12 #include <boost/config.hpp>
27 const std::nullptr_t
nullptr;
30 #elif(defined(BOOST_NO_CXX11_NULLPTR) || defined(BOOST_NO_NULLPTR)) && \
35 #if __GNUC__ &&__GNUC__ == 4 && __GNUC_MINOR__ >= 6
36 IMP_GCC_PRAGMA(diagnostic push)
37 IMP_GCC_PRAGMA(diagnostic ignored
"-Wc++0x-compat")
42 operator O *()
const {
43 return static_cast<O *
>(NULL);
51 inline bool operator==(O *a, nullptr_t o) {
52 return a ==
static_cast<O *
>(o);
55 inline bool operator!=(O *a, nullptr_t o) {
56 return a !=
static_cast<O *
>(o);
58 extern IMPKERNELEXPORT
const nullptr_t
nullptr;
60 #if __GNUC__ &&__GNUC__ == 4 && __GNUC_MINOR__ >= 6
61 IMP_GCC_PRAGMA(diagnostic pop)
65 extern const void *
const nullptr;