Skip to content

Commit

Permalink
define NIM_NIL nullptr when __cplusplus >= 201103L
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour authored and Araq committed Oct 8, 2018
1 parent 269b957 commit 403f5ae
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/nimbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,13 @@ namespace USE_NIM_NAMESPACE {
# define NIM_FALSE false
# endif
# define NIM_BOOL bool
# define NIM_NIL 0
# 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
# endif
#else
# ifdef bool
# define NIM_BOOL bool
Expand Down

0 comments on commit 403f5ae

Please sign in to comment.