define NIM_NIL nullptr when __cplusplus >= 201103L
This commit is contained in:
parent
269b957e29
commit
403f5aea14
1 changed files with 7 additions and 1 deletions
|
|
@ -280,7 +280,13 @@ namespace USE_NIM_NAMESPACE {
|
||||||
# define NIM_FALSE false
|
# define NIM_FALSE false
|
||||||
# endif
|
# endif
|
||||||
# define NIM_BOOL bool
|
# define NIM_BOOL bool
|
||||||
|
# if __cplusplus >= 201103L
|
||||||
|
# /* nullptr is more type safe (less implicit conversions than 0) */
|
||||||
|
# define NIM_NIL nullptr
|
||||||
|
# else
|
||||||
|
# /* consider using NULL if comment below for NIM_NIL doesn't apply to C++ */
|
||||||
# define NIM_NIL 0
|
# define NIM_NIL 0
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
# ifdef bool
|
# ifdef bool
|
||||||
# define NIM_BOOL bool
|
# define NIM_BOOL bool
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue