Use detail check for number 1 rather than empty implementation.

This commit is contained in:
Edward Diener
2020-06-10 10:44:35 -04:00
parent 25aaea0136
commit e8bbb16f57
4 changed files with 20 additions and 17 deletions

View File

@ -18,12 +18,12 @@
# include <boost/preprocessor/config/config.hpp>
# include <boost/preprocessor/control/iif.hpp>
# include <boost/preprocessor/facilities/identity.hpp>
# include <boost/preprocessor/facilities/is_1.hpp>
# include <boost/preprocessor/tuple/elem.hpp>
# include <boost/preprocessor/arithmetic/detail/is_1_number.hpp>
#
# /* BOOST_PP_DIV */
#
# define BOOST_PP_DIV(x, y) BOOST_PP_IIF(BOOST_PP_IS_1(y),BOOST_PP_IDENTITY_N(x,2),BOOST_PP_DIV_DO)(x,y)
# define BOOST_PP_DIV(x, y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_1_NUMBER(y),BOOST_PP_IDENTITY_N(x,2),BOOST_PP_DIV_DO)(x,y)
#
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
# define BOOST_PP_DIV_DO(x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_DIV_BASE(x, y))
@ -34,7 +34,7 @@
#
# /* BOOST_PP_DIV_D */
#
# define BOOST_PP_DIV_D(d, x, y) BOOST_PP_IIF(BOOST_PP_IS_1(y),BOOST_PP_IDENTITY_N(x,3),BOOST_PP_DIV_DO_D)(d,x,y)
# define BOOST_PP_DIV_D(d, x, y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_1_NUMBER(y),BOOST_PP_IDENTITY_N(x,3),BOOST_PP_DIV_DO_D)(d,x,y)
#
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
# define BOOST_PP_DIV_DO_D(d, x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_DIV_BASE_D(d, x, y))