Added arithmetic testing for numbers up to 512. Corrected seq macro which does not expect a number above 256.

This commit is contained in:
Edward Diener
2020-05-04 18:44:20 -04:00
parent c859da1fc9
commit fd3b57b15a
2 changed files with 28 additions and 3 deletions

View File

@ -15,7 +15,7 @@
# include <boost/preprocessor/arithmetic/inc.hpp>
# include <boost/preprocessor/comparison/not_equal.hpp>
# include <boost/preprocessor/config/config.hpp>
# include <boost/preprocessor/control/expr_iif.hpp>
# include <boost/preprocessor/control/iif.hpp>
# include <boost/preprocessor/facilities/identity.hpp>
# include <boost/preprocessor/logical/bitand.hpp>
# include <boost/preprocessor/seq/detail/is_empty.hpp>
@ -31,16 +31,22 @@
# define BOOST_PP_SEQ_REST_N_I(n, seq) BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq))
# endif
#
# define BOOST_PP_SEQ_REST_N_DETAIL_EXEC_NO_MATCH(n, seq)
# define BOOST_PP_SEQ_REST_N_DETAIL_EXEC_MATCH(n, seq) \
BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), BOOST_PP_IDENTITY( (nil) seq )))() \
/**/
# define BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, size) \
BOOST_PP_EXPR_IIF \
BOOST_PP_IIF \
( \
BOOST_PP_BITAND \
( \
BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size), \
BOOST_PP_NOT_EQUAL(n,size) \
), \
BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), BOOST_PP_IDENTITY( (nil) seq )))() \
BOOST_PP_SEQ_REST_N_DETAIL_EXEC_MATCH, \
BOOST_PP_SEQ_REST_N_DETAIL_EXEC_NO_MATCH \
) \
(n, seq) \
/**/
#
# endif

View File

@ -92,6 +92,25 @@ alias preprocessor_number_512
[ compile tuple.cpp : <define>BOOST_PP_LIMIT_MAG=512 : tuple_num ]
;
alias preprocessor_number_nvm_512
:
[ compile arithmetic.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : arithmetic_nvm_num ]
[ compile array.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : array_nvm_num ]
[ compile comparison.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : comparison_nvm_num ]
[ compile control.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : control_nvm_num ]
[ compile debug.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : debug_nvm_num ]
[ compile facilities.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : facilities_nvm_num ]
[ compile iteration.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : iteration_nvm_num ]
[ compile list.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : list_nvm_num ]
[ compile logical.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : logical_nvm_num ]
[ compile repetition.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : repetition_nvm_num ]
[ compile selection.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : selection_nvm_num ]
[ compile seq.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : seq_nvm_num ]
[ compile slot.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : slot_nvm_num ]
[ compile stringize.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : stringize_nvm_num ]
[ compile tuple.cpp : <define>BOOST_PP_LIMIT_MAG=512 <define>BOOST_PP_VARIADICS=0 : tuple_nvm_num ]
;
alias preprocessor_c
:
[ compile arithmetic.c