mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-02 14:24:30 +02:00
Avoid Wzero-as-null-pointer-constant
warning (#75)
Newer compilers may warn when using `0`, e.g.: ``` ./boost/iterator/detail/facade_iterator_category.hpp:161:5: error: zero as null pointer constant [-Werror,-Wzero-as-null-pointer-constant] BOOST_MPL_ASSERT_NOT((is_iterator_category<Traversal>)); ^ ./boost/mpl/assert.hpp:324:58: note: expanded from macro 'BOOST_MPL_ASSERT_NOT' boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \ ```
This commit is contained in:
@@ -297,7 +297,7 @@ BOOST_MPL_AUX_ASSERT_CONSTANT( \
|
|||||||
std::size_t \
|
std::size_t \
|
||||||
, BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
|
, BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
|
||||||
boost::mpl::assertion_failed<false>( \
|
boost::mpl::assertion_failed<false>( \
|
||||||
boost::mpl::assert_arg( (void (*) pred)0, 1 ) \
|
boost::mpl::assert_arg( (void (*) pred)BOOST_NULLPTR, 1 ) \
|
||||||
) \
|
) \
|
||||||
) \
|
) \
|
||||||
) \
|
) \
|
||||||
@@ -310,7 +310,7 @@ BOOST_MPL_AUX_ASSERT_CONSTANT( \
|
|||||||
enum { \
|
enum { \
|
||||||
BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
|
BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
|
||||||
boost::mpl::assertion<false>::failed( \
|
boost::mpl::assertion<false>::failed( \
|
||||||
boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \
|
boost::mpl::assert_not_arg( (void (*) pred)BOOST_NULLPTR, 1 ) \
|
||||||
) \
|
) \
|
||||||
) \
|
) \
|
||||||
}\
|
}\
|
||||||
@@ -321,7 +321,7 @@ BOOST_MPL_AUX_ASSERT_CONSTANT( \
|
|||||||
std::size_t \
|
std::size_t \
|
||||||
, BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
|
, BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
|
||||||
boost::mpl::assertion_failed<false>( \
|
boost::mpl::assertion_failed<false>( \
|
||||||
boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \
|
boost::mpl::assert_not_arg( (void (*) pred)BOOST_NULLPTR, 1 ) \
|
||||||
) \
|
) \
|
||||||
) \
|
) \
|
||||||
) \
|
) \
|
||||||
|
Reference in New Issue
Block a user