forked from boostorg/preprocessor
Updated arithmetic implementations to deal with corner cases whichy run out of WHILE loops.
This commit is contained in:
@ -20,12 +20,17 @@
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/control/while.hpp>
|
||||
# include <boost/preprocessor/facilities/identity.hpp>
|
||||
# include <boost/preprocessor/logical/bitand.hpp>
|
||||
# include <boost/preprocessor/logical/bitor.hpp>
|
||||
# include <boost/preprocessor/logical/bool.hpp>
|
||||
# include <boost/preprocessor/logical/compl.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/arithmetic/detail/is_maximum_number.hpp>
|
||||
# include <boost/preprocessor/arithmetic/detail/is_minimum_number.hpp>
|
||||
#
|
||||
# /* BOOST_PP_ADD */
|
||||
#
|
||||
# define BOOST_PP_ADD(x, y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(y),BOOST_PP_IDENTITY_N(BOOST_PP_DETAIL_MAXIMUM_NUMBER,2),BOOST_PP_ADD_DO)(x,y)
|
||||
# define BOOST_PP_ADD(x, y) BOOST_PP_IIF(BOOST_PP_BITOR(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(y),BOOST_PP_DETAIL_IS_MINIMUM_NUMBER(x)),BOOST_PP_IDENTITY_N(y,2),BOOST_PP_ADD_DO)(x,y)
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_ADD_DO(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y)))
|
||||
@ -34,7 +39,7 @@
|
||||
# define BOOST_PP_ADD_I(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y)))
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_ADD_P(d, xy) BOOST_PP_TUPLE_ELEM(2, 1, xy)
|
||||
# define BOOST_PP_ADD_P(d, xy) BOOST_PP_BITAND(BOOST_PP_BOOL(BOOST_PP_TUPLE_ELEM(2, 1, xy)),BOOST_PP_COMPL(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(BOOST_PP_TUPLE_ELEM(2, 0, xy))))
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||
# define BOOST_PP_ADD_O(d, xy) BOOST_PP_ADD_O_I xy
|
||||
@ -46,13 +51,13 @@
|
||||
#
|
||||
# /* BOOST_PP_ADD_D */
|
||||
#
|
||||
# define BOOST_PP_ADD_D(d, x, y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(y),BOOST_PP_IDENTITY_N(BOOST_PP_DETAIL_MAXIMUM_NUMBER,3),BOOST_PP_ADD_D_DO)(d,x,y)
|
||||
# define BOOST_PP_ADD_D(d, x, y) BOOST_PP_IIF(BOOST_PP_BITOR(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(y),BOOST_PP_DETAIL_IS_MINIMUM_NUMBER(x)),BOOST_PP_IDENTITY_N(y,3),BOOST_PP_ADD_DO_D)(d,x,y)
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_ADD_D_DO(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y)))
|
||||
# define BOOST_PP_ADD_DO_D(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y)))
|
||||
# else
|
||||
# define BOOST_PP_ADD_D_DO(d, x, y) BOOST_PP_ADD_D_DO_I(d, x, y)
|
||||
# define BOOST_PP_ADD_D_DO_I(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y)))
|
||||
# define BOOST_PP_ADD_DO_D(d, x, y) BOOST_PP_ADD_D_I(d, x, y)
|
||||
# define BOOST_PP_ADD_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y)))
|
||||
# endif
|
||||
#
|
||||
# endif
|
||||
|
@ -16,23 +16,39 @@
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/detail/div_base.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/facilities/identity.hpp>
|
||||
# include <boost/preprocessor/logical/bitand.hpp>
|
||||
# include <boost/preprocessor/logical/compl.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/arithmetic/detail/is_maximum_number.hpp>
|
||||
# include <boost/preprocessor/arithmetic/detail/is_maximum_number.hpp>
|
||||
#
|
||||
# /* BOOST_PP_DIV */
|
||||
#
|
||||
# define BOOST_PP_DIV(x, y) \
|
||||
BOOST_PP_IIF(BOOST_PP_BITAND(BOOST_PP_DETAIL_IS_MINIMUM_NUMBER(x),BOOST_PP_COMPL(BOOST_PP_DETAIL_IS_MINIMUM_NUMBER(y))),BOOST_PP_IDENTITY_N(x,2),BOOST_PP_DIV_CHECK_MAX)(x,y)
|
||||
#
|
||||
# define BOOST_PP_DIV_CHECK_MAX(x, y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(y),BOOST_PP_IDENTITY_N(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(x),2),BOOST_PP_DIV_DO)(x,y)
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_DIV(x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_DIV_BASE(x, y))
|
||||
# define BOOST_PP_DIV_DO(x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_DIV_BASE(x, y))
|
||||
# else
|
||||
# define BOOST_PP_DIV(x, y) BOOST_PP_DIV_I(x, y)
|
||||
# define BOOST_PP_DIV_DO(x, y) BOOST_PP_DIV_I(x, y)
|
||||
# define BOOST_PP_DIV_I(x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_DIV_BASE(x, y))
|
||||
# endif
|
||||
#
|
||||
# /* BOOST_PP_DIV_D */
|
||||
#
|
||||
# define BOOST_PP_DIV_D(d, x, y) \
|
||||
BOOST_PP_IIF(BOOST_PP_BITAND(BOOST_PP_DETAIL_IS_MINIMUM_NUMBER(x),BOOST_PP_COMPL(BOOST_PP_DETAIL_IS_MINIMUM_NUMBER(y))),BOOST_PP_IDENTITY_N(x,3),BOOST_PP_DIV_CHECK_MAX_D)(d,x,y)
|
||||
#
|
||||
# define BOOST_PP_DIV_CHECK_MAX_D(d, x, y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(y),BOOST_PP_IDENTITY_N(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(x),3),BOOST_PP_DIV_DO_D)(d,x,y)
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_DIV_D(d, x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_DIV_BASE_D(d, x, y))
|
||||
# define BOOST_PP_DIV_DO_D(d, x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_DIV_BASE_D(d, x, y))
|
||||
# else
|
||||
# define BOOST_PP_DIV_D(d, x, y) BOOST_PP_DIV_D_I(d, x, y)
|
||||
# define BOOST_PP_DIV_DO_D(d, x, y) BOOST_PP_DIV_D_I(d, x, y)
|
||||
# define BOOST_PP_DIV_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_DIV_BASE_D(d, x, y))
|
||||
# endif
|
||||
#
|
||||
|
@ -16,23 +16,45 @@
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/detail/div_base.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/facilities/identity.hpp>
|
||||
# include <boost/preprocessor/logical/bitand.hpp>
|
||||
# include <boost/preprocessor/logical/compl.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/arithmetic/detail/is_maximum_number.hpp>
|
||||
# include <boost/preprocessor/arithmetic/detail/is_minimum_number.hpp>
|
||||
#
|
||||
# /* BOOST_PP_MOD */
|
||||
#
|
||||
# define BOOST_PP_MOD(x, y) \
|
||||
BOOST_PP_IIF(BOOST_PP_BITAND(BOOST_PP_DETAIL_IS_MINIMUM_NUMBER(x),BOOST_PP_COMPL(BOOST_PP_DETAIL_IS_MINIMUM_NUMBER(y))), \
|
||||
BOOST_PP_IDENTITY_N(x,2),BOOST_PP_MOD_CHECKMAX)(x,y)
|
||||
#
|
||||
# define BOOST_PP_MOD_CHECKMAX(x, y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(y),BOOST_PP_MOD_CHECK_OTHER_MAX,BOOST_PP_MOD_DO)(x,y)
|
||||
#
|
||||
# define BOOST_PP_MOD_CHECK_OTHER_MAX(x, y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(x),0,x)
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_MOD(x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE(x, y))
|
||||
# define BOOST_PP_MOD_DO(x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE(x, y))
|
||||
# else
|
||||
# define BOOST_PP_MOD(x, y) BOOST_PP_MOD_I(x, y)
|
||||
# define BOOST_PP_MOD_DO(x, y) BOOST_PP_MOD_I(x, y)
|
||||
# define BOOST_PP_MOD_I(x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE(x, y))
|
||||
# endif
|
||||
#
|
||||
# /* BOOST_PP_MOD_D */
|
||||
#
|
||||
# define BOOST_PP_MOD_D(d, x, y) \
|
||||
BOOST_PP_IIF(BOOST_PP_BITAND(BOOST_PP_DETAIL_IS_MINIMUM_NUMBER(x),BOOST_PP_COMPL(BOOST_PP_DETAIL_IS_MINIMUM_NUMBER(y))), \
|
||||
BOOST_PP_IDENTITY_N(x,3),BOOST_PP_MOD_CHECKMAX_D)(d,x,y)
|
||||
#
|
||||
# define BOOST_PP_MOD_CHECKMAX_D(d, x, y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(y),BOOST_PP_MOD_CHECK_OTHER_MAX_D,BOOST_PP_MOD_DO_D)(d,x,y)
|
||||
#
|
||||
# define BOOST_PP_MOD_CHECK_OTHER_MAX_D(d, x, y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(x),0,x)
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_MOD_D(d, x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE_D(d, x, y))
|
||||
# define BOOST_PP_MOD_DO_D(d, x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE_D(d, x, y))
|
||||
# else
|
||||
# define BOOST_PP_MOD_D(d, x, y) BOOST_PP_MOD_D_I(d, x, y)
|
||||
# define BOOST_PP_MOD_DO_D(d, x, y) BOOST_PP_MOD_D_I(d, x, y)
|
||||
# define BOOST_PP_MOD_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE_D(d, x, y))
|
||||
# endif
|
||||
#
|
||||
|
@ -19,6 +19,10 @@
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/control/while.hpp>
|
||||
# include <boost/preprocessor/facilities/identity.hpp>
|
||||
# include <boost/preprocessor/logical/bitand.hpp>
|
||||
# include <boost/preprocessor/logical/bool.hpp>
|
||||
# include <boost/preprocessor/logical/compl.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
# include <boost/preprocessor/arithmetic/detail/is_minimum_number.hpp>
|
||||
@ -26,9 +30,9 @@
|
||||
#
|
||||
# /* BOOST_PP_MUL */
|
||||
#
|
||||
# define BOOST_PP_MUL(x, y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(y),BOOST_PP_MUL_CHECK_MIN,BOOST_PP_MUL_DO)(x,y)
|
||||
# define BOOST_PP_MUL(x, y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_MINIMUM_NUMBER(x),BOOST_PP_IDENTITY_N(x,2),BOOST_PP_MUL_CHECK_MAX)(x,y)
|
||||
#
|
||||
# define BOOST_PP_MUL_CHECK_MIN(x,y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_MINIMUM_NUMBER(x),0,BOOST_PP_DETAIL_MAXIMUM_NUMBER)
|
||||
# define BOOST_PP_MUL_CHECK_MAX(x, y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(y),BOOST_PP_IDENTITY_N(y,2),BOOST_PP_MUL_DO)(x,y)
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_MUL_DO(x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_WHILE(BOOST_PP_MUL_P, BOOST_PP_MUL_O, (0, x, y)))
|
||||
@ -37,7 +41,7 @@
|
||||
# define BOOST_PP_MUL_I(x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_WHILE(BOOST_PP_MUL_P, BOOST_PP_MUL_O, (0, x, y)))
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_MUL_P(d, rxy) BOOST_PP_TUPLE_ELEM(3, 2, rxy)
|
||||
# define BOOST_PP_MUL_P(d, rxy) BOOST_PP_BITAND(BOOST_PP_BOOL(BOOST_PP_TUPLE_ELEM(3, 2, rxy)),BOOST_PP_COMPL(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(BOOST_PP_TUPLE_ELEM(3, 0, rxy))))
|
||||
#
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
|
||||
# define BOOST_PP_MUL_O(d, rxy) BOOST_PP_MUL_O_IM(d, BOOST_PP_TUPLE_REM_3 rxy)
|
||||
@ -50,9 +54,9 @@
|
||||
#
|
||||
# /* BOOST_PP_MUL_D */
|
||||
#
|
||||
# define BOOST_PP_MUL_D(d, x, y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(y),BOOST_PP_MUL_CHECK_MIN_D,BOOST_PP_MUL_DO_D)(d,x,y)
|
||||
# define BOOST_PP_MUL_D(d, x, y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_MINIMUM_NUMBER(x),BOOST_PP_IDENTITY_N(x,3),BOOST_PP_MUL_CHECK_MAX_D)(d,x,y)
|
||||
#
|
||||
# define BOOST_PP_MUL_CHECK_MIN_D(d,x,y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_MINIMUM_NUMBER(x),0,BOOST_PP_DETAIL_MAXIMUM_NUMBER)
|
||||
# define BOOST_PP_MUL_CHECK_MAX_D(d, x, y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(y),BOOST_PP_IDENTITY_N(y,3),BOOST_PP_MUL_DO_D)(d,x,y)
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_MUL_DO_D(d, x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_MUL_P, BOOST_PP_MUL_O, (0, x, y)))
|
||||
|
@ -19,12 +19,15 @@
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/control/while.hpp>
|
||||
# include <boost/preprocessor/facilities/identity.hpp>
|
||||
# include <boost/preprocessor/logical/and.hpp>
|
||||
# include <boost/preprocessor/logical/bitor.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/arithmetic/detail/is_maximum_number.hpp>
|
||||
# include <boost/preprocessor/arithmetic/detail/is_minimum_number.hpp>
|
||||
#
|
||||
# /* BOOST_PP_SUB */
|
||||
#
|
||||
# define BOOST_PP_SUB(x, y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(y),BOOST_PP_IDENTITY_N(0,2),BOOST_PP_SUB_DO)(x,y)
|
||||
# define BOOST_PP_SUB(x, y) BOOST_PP_IIF(BOOST_PP_BITOR(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(y),BOOST_PP_DETAIL_IS_MINIMUM_NUMBER(x)),BOOST_PP_IDENTITY_N(0,2),BOOST_PP_SUB_DO)(x,y)
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_SUB_DO(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y)))
|
||||
@ -33,7 +36,7 @@
|
||||
# define BOOST_PP_SUB_I(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y)))
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_SUB_P(d, xy) BOOST_PP_TUPLE_ELEM(2, 1, xy)
|
||||
# define BOOST_PP_SUB_P(d, xy) BOOST_PP_AND(BOOST_PP_TUPLE_ELEM(2, 1, xy),BOOST_PP_TUPLE_ELEM(2, 0, xy))
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||
# define BOOST_PP_SUB_O(d, xy) BOOST_PP_SUB_O_I xy
|
||||
@ -45,12 +48,12 @@
|
||||
#
|
||||
# /* BOOST_PP_SUB_D */
|
||||
#
|
||||
# define BOOST_PP_SUB_D(d, x, y) BOOST_PP_IIF(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(y),BOOST_PP_IDENTITY_N(0,3),BOOST_PP_SUB_D_DO)(d,x,y)
|
||||
# define BOOST_PP_SUB_D(d, x, y) BOOST_PP_IIF(BOOST_PP_BITOR(BOOST_PP_DETAIL_IS_MAXIMUM_NUMBER(y),BOOST_PP_DETAIL_IS_MINIMUM_NUMBER(x)),BOOST_PP_IDENTITY_N(0,3),BOOST_PP_SUB_DO_D)(d,x,y)
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_SUB_D_DO(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y)))
|
||||
# define BOOST_PP_SUB_DO_D(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y)))
|
||||
# else
|
||||
# define BOOST_PP_SUB_D_DO(d, x, y) BOOST_PP_SUB_D_I(d, x, y)
|
||||
# define BOOST_PP_SUB_DO_D(d, x, y) BOOST_PP_SUB_D_I(d, x, y)
|
||||
# define BOOST_PP_SUB_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y)))
|
||||
# endif
|
||||
#
|
||||
|
@ -23,6 +23,8 @@ BEGIN BOOST_PP_ADD(1, 256) == 256 END
|
||||
BEGIN BOOST_PP_ADD(256, 1) == 256 END
|
||||
BEGIN BOOST_PP_ADD(2, 255) == 256 END
|
||||
BEGIN BOOST_PP_ADD(255, 2) == 256 END
|
||||
BEGIN BOOST_PP_ADD(1, 255) == 256 END
|
||||
BEGIN BOOST_PP_ADD(255, 1) == 256 END
|
||||
|
||||
#endif
|
||||
|
||||
@ -98,8 +100,8 @@ BEGIN BOOST_PP_MUL(BOOST_PP_LIMIT_MAG, 2) == BOOST_PP_LIMIT_MAG END
|
||||
|
||||
#if BOOST_PP_LIMIT_MAG == 256
|
||||
|
||||
// BEGIN BOOST_PP_MUL(2, 255) == 256 END
|
||||
// BEGIN BOOST_PP_MUL(255, 2) == 256 END
|
||||
BEGIN BOOST_PP_MUL(2, 255) == 256 END
|
||||
BEGIN BOOST_PP_MUL(255, 2) == 256 END
|
||||
BEGIN BOOST_PP_MUL(17, 17) == 256 END
|
||||
|
||||
#endif
|
||||
@ -115,8 +117,8 @@ BEGIN BOOST_PP_MUL(BOOST_PP_MUL(7, 7), 7) == 343 END
|
||||
BEGIN BOOST_PP_MUL(7, BOOST_PP_MUL(7, 7)) == 343 END
|
||||
BEGIN BOOST_PP_MUL(BOOST_PP_MUL(5, 5), BOOST_PP_MUL(4, 4)) == 400 END
|
||||
|
||||
// BEGIN BOOST_PP_MUL(2, 511) == 512 END
|
||||
// BEGIN BOOST_PP_MUL(511, 2) == 512 END
|
||||
BEGIN BOOST_PP_MUL(2, 511) == 512 END
|
||||
BEGIN BOOST_PP_MUL(511, 2) == 512 END
|
||||
BEGIN BOOST_PP_MUL(24, 24) == 512 END
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user