Skip to content

Commit

Permalink
Merge pull request #41 from MartinDelille/fix-zero-as-null-pointer-co…
Browse files Browse the repository at this point in the history
…nstant-warning

Fix zero as null pointer constant warning
  • Loading branch information
sbeyer authored Jun 10, 2019
2 parents 0e65581 + 37f0f38 commit ad130f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/snowhouse/stringizers.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ namespace snowhouse
template<typename>
static no compile_time_check_const_iterator(...);

#ifdef SNOWHOUSE_HAS_NULLPTR
static const bool value = sizeof(compile_time_check_const_iterator<T>(nullptr)) == sizeof(yes);
#else
static const bool value = sizeof(compile_time_check_const_iterator<T>(0)) == sizeof(yes);
#endif
};

template<typename T, bool = is_const_iterable<T>::value>
Expand Down

0 comments on commit ad130f8

Please sign in to comment.